class PgSearch::Multisearch::Rebuilder

def rebuild

def rebuild
  if model.respond_to?(:rebuild_pg_search_documents)
    model.rebuild_pg_search_documents
  elsif conditional? || dynamic? || additional_attributes?
    model.find_each(&:update_pg_search_document)
  else
    model.connection.execute(rebuild_sql)
  end
end