def index_update(record)
      return if self.aai_config.disable_auto_indexing

      build_index
      index = new_index
      index.update_record(record,find(record.id))
      @query_cache = {}
    end
def index_update(record)
      return if self.aai_config.disable_auto_indexing

      build_index
      index = new_index
      index.update_record(record,find(record.id))
      @query_cache = {}
    end
Updates the index.
 1. Removes the previous version of the record from the index
 2. Adds the new version to the index.