Module: Chewy::Search

Extended by:
ActiveSupport::Concern
Included in:
Index, Type
Defined in:
lib/chewy/search.rb,
lib/chewy/search/loader.rb,
lib/chewy/search/request.rb,
lib/chewy/search/scoping.rb,
lib/chewy/search/response.rb,
lib/chewy/search/scrolling.rb,
lib/chewy/search/parameters.rb,
lib/chewy/search/query_proxy.rb,
lib/chewy/search/parameters/aggs.rb,
lib/chewy/search/parameters/load.rb,
lib/chewy/search/parameters/none.rb,
lib/chewy/search/parameters/limit.rb,
lib/chewy/search/parameters/order.rb,
lib/chewy/search/parameters/query.rb,
lib/chewy/search/parameters/types.rb,
lib/chewy/search/parameters/filter.rb,
lib/chewy/search/parameters/offset.rb,
lib/chewy/search/parameters/source.rb,
lib/chewy/search/parameters/explain.rb,
lib/chewy/search/parameters/indices.rb,
lib/chewy/search/parameters/profile.rb,
lib/chewy/search/parameters/rescore.rb,
lib/chewy/search/parameters/storage.rb,
lib/chewy/search/parameters/suggest.rb,
lib/chewy/search/parameters/timeout.rb,
lib/chewy/search/parameters/version.rb,
lib/chewy/search/pagination/kaminari.rb,
lib/chewy/search/parameters/highlight.rb,
lib/chewy/search/parameters/min_score.rb,
lib/chewy/search/parameters/preference.rb,
lib/chewy/search/parameters/post_filter.rb,
lib/chewy/search/parameters/search_type.rb,
lib/chewy/search/parameters/search_after.rb,
lib/chewy/search/parameters/track_scores.rb,
lib/chewy/search/pagination/will_paginate.rb,
lib/chewy/search/parameters/indices_boost.rb,
lib/chewy/search/parameters/request_cache.rb,
lib/chewy/search/parameters/script_fields.rb,
lib/chewy/search/parameters/stored_fields.rb,
lib/chewy/search/parameters/docvalue_fields.rb,
lib/chewy/search/parameters/terminate_after.rb,
lib/chewy/search/parameters/concerns/bool_storage.rb,
lib/chewy/search/parameters/concerns/hash_storage.rb,
lib/chewy/search/parameters/concerns/query_storage.rb,
lib/chewy/search/parameters/concerns/string_storage.rb,
lib/chewy/search/parameters/concerns/integer_storage.rb,
lib/chewy/search/parameters/allow_partial_search_results.rb,
lib/chewy/search/parameters/concerns/string_array_storage.rb

Overview

This module being included to any provides an interface to the request DSL. By default it is included to Index and Type.

The class used as a request DSL provider is inherited from Request by default, but if you need ES < 2.0 DSL support - you can switch it to Query using Config#search_class

Also, the search class is refined with one of the pagination- providing modules: Pagination::Kaminari or Pagination::WillPaginate.

Examples:

PlacesIndex.query(match: {name: 'Moscow'})
PlacesIndex::City.query(match: {name: 'Moscow'})

See Also:

Defined Under Namespace

Modules: ClassMethods, Pagination, Scoping, Scrolling Classes: Loader, Parameters, QueryProxy, Request, Response