Class: Elasticsearch::DSL::Search::Options
- Inherits:
-
Object
- Object
- Elasticsearch::DSL::Search::Options
- Defined in:
- lib/elasticsearch/dsl/search/options.rb
Overview
Wraps the “extra” options of a search definition
Constant Summary collapse
- DSL_METHODS =
[ :_source, :fields, :script_fields, :fielddata_fields, :rescore, :explain, :version, :indices_boost, :track_scores, :min_score ]
Instance Method Summary collapse
-
#empty? ⇒ Boolean
Returns true when there are no search options defined.
-
#initialize(*args, &block) ⇒ Options
constructor
A new instance of Options.
-
#to_hash(options = {}) ⇒ Hash
Convert the definition to a Hash.
Constructor Details
#initialize(*args, &block) ⇒ Options
Returns a new instance of Options.
23 24 25 26 |
# File 'lib/elasticsearch/dsl/search/options.rb', line 23 def initialize(*args, &block) super @hash = {} end |
Instance Method Details
#empty? ⇒ Boolean
Returns true when there are no search options defined
42 43 44 |
# File 'lib/elasticsearch/dsl/search/options.rb', line 42 def empty? @hash.empty? end |
#to_hash(options = {}) ⇒ Hash
Convert the definition to a Hash
50 51 52 |
# File 'lib/elasticsearch/dsl/search/options.rb', line 50 def to_hash(={}) @hash end |