private void addIndexedDateAttributes(Document document, ITask task) {
   addIndexedAttribute(
       document, DefaultTaskSchema.getInstance().DATE_COMPLETION, task.getCompletionDate());
   addIndexedAttribute(
       document, DefaultTaskSchema.getInstance().DATE_CREATION, task.getCreationDate());
   addIndexedAttribute(document, DefaultTaskSchema.getInstance().DATE_DUE, task.getDueDate());
   addIndexedAttribute(
       document, DefaultTaskSchema.getInstance().DATE_MODIFICATION, task.getModificationDate());
 }
  @Override
  public boolean hasTaskChanged(TaskRepository taskRepository, ITask task, TaskData taskData) {
    TaskAttribute attribute = taskData.getRoot().getAttribute(TaskAttribute.DATE_MODIFICATION);

    if (attribute != null) {
      Date dataModificationDate = taskData.getAttributeMapper().getDateValue(attribute);

      if (dataModificationDate != null) {
        Date taskModificationDate = task.getModificationDate();

        if (taskModificationDate != null) return !taskModificationDate.equals(dataModificationDate);
      }
    }

    return true;
  }