Class: ElasticQuery::RescoreQuery
- Defined in:
- lib/elastic_query/rescore_query.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#rescore_query ⇒ Object
readonly
Returns the value of attribute rescore_query.
Attributes inherited from Query
Instance Method Summary collapse
-
#initialize(query, rescore_query, options = {}) ⇒ RescoreQuery
constructor
A new instance of RescoreQuery.
- #to_hash ⇒ Object
Constructor Details
#initialize(query, rescore_query, options = {}) ⇒ RescoreQuery
Returns a new instance of RescoreQuery.
5 6 7 8 9 |
# File 'lib/elastic_query/rescore_query.rb', line 5 def initialize(query, rescore_query, = {}) @options = @rescore_query = rescore_query super(query) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/elastic_query/rescore_query.rb', line 3 def @options end |
#rescore_query ⇒ Object (readonly)
Returns the value of attribute rescore_query.
3 4 5 |
# File 'lib/elastic_query/rescore_query.rb', line 3 def rescore_query @rescore_query end |
Instance Method Details
#to_hash ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/elastic_query/rescore_query.rb', line 11 def to_hash { query: query.to_hash, rescore: { rescore_query: rescore_query.to_hash, }.merge() } end |