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.
40 41 42 |
# File 'lib/elasticsearch/dsl/search/options.rb', line 40 def initialize(*args, &block) @hash = {} end |
Instance Method Details
#empty? ⇒ Boolean
Returns true when there are no search options defined
58 59 60 |
# File 'lib/elasticsearch/dsl/search/options.rb', line 58 def empty? @hash.empty? end |
#to_hash(options = {}) ⇒ Hash
Convert the definition to a Hash
66 67 68 |
# File 'lib/elasticsearch/dsl/search/options.rb', line 66 def to_hash(={}) @hash end |