Module: Hunt::ClassMethods

Defined in:
lib/hunt.rb

Instance Method Summary collapse

Instance Method Details

#search(term) ⇒ Object



23
24
25
# File 'lib/hunt.rb', line 23

def search(term)
  where('searches.default' => Util.to_stemmed_words(term))
end

#search_keysObject



13
14
15
# File 'lib/hunt.rb', line 13

def search_keys
  @search_keys ||= []
end

#searches(*keys) ⇒ Object



17
18
19
20
21
# File 'lib/hunt.rb', line 17

def searches(*keys)
  # Using a hash to support multiple indexes per document at some point
  key(:searches, Hash)
  @search_keys = keys
end