Module: Chewy::Search::ClassMethods

Defined in:
lib/chewy/search.rb

Instance Method Summary collapse

Instance Method Details

#allObject



17
18
19
# File 'lib/chewy/search.rb', line 17

def all
  Chewy::Query.new(search_index, types: search_type)
end

#search_indexObject

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/chewy/search.rb', line 26

def search_index
  raise NotImplementedError
end

#search_string(query, options = {}) ⇒ Object



21
22
23
24
# File 'lib/chewy/search.rb', line 21

def search_string query, options = {}
  options = options.merge(index: search_index.index_name, type: search_type, q: query)
  client.search(options)
end

#search_typeObject

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/chewy/search.rb', line 30

def search_type
  raise NotImplementedError
end