module RediSearch::Model::ModelClassMethods

Public Instance Methods

reindex(recreate: false, only: []) click to toggle source
# File lib/redi_search/model.rb, line 51
def reindex(recreate: false, only: [])
  search_import.find_in_batches.all? do |group|
    redi_search_index.reindex(
      group.map { |record| record.redi_search_document(only: only) },
      recreate: recreate
    )
  end
end
spellcheck(term, distance: 1) click to toggle source
# File lib/redi_search/model.rb, line 47
def spellcheck(term, distance: 1)
  redi_search_index.spellcheck(term, distance: distance)
end