Class: OpenSearch::DSL::Search::Options
- Inherits:
-
Object
- Object
- OpenSearch::DSL::Search::Options
- Defined in:
- lib/opensearch/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, :track_total_hits ]
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.
49 50 51 |
# File 'lib/opensearch/dsl/search/options.rb', line 49 def initialize(*args, &block) @hash = {} end |
Instance Method Details
#empty? ⇒ Boolean
Returns true when there are no search options defined
67 68 69 |
# File 'lib/opensearch/dsl/search/options.rb', line 67 def empty? @hash.empty? end |
#to_hash(options = {}) ⇒ Hash
Convert the definition to a Hash
75 76 77 |
# File 'lib/opensearch/dsl/search/options.rb', line 75 def to_hash(={}) @hash end |