Class: Elasticband::Query::MultiMatch
- Inherits:
-
Elasticband::Query
- Object
- Elasticband::Query
- Elasticband::Query::MultiMatch
- Defined in:
- lib/elasticband/query/multi_match.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#options ⇒ Object
Returns the value of attribute options.
-
#query ⇒ Object
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(query, fields = [:_all], options = {}) ⇒ MultiMatch
constructor
A new instance of MultiMatch.
- #to_h ⇒ Object
Methods inherited from Elasticband::Query
Constructor Details
#initialize(query, fields = [:_all], options = {}) ⇒ MultiMatch
Returns a new instance of MultiMatch.
6 7 8 9 10 |
# File 'lib/elasticband/query/multi_match.rb', line 6 def initialize(query, fields = [:_all], = {}) self.query = query self.fields = Array.wrap(fields).map(&:to_sym) self. = end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
4 5 6 |
# File 'lib/elasticband/query/multi_match.rb', line 4 def fields @fields end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/elasticband/query/multi_match.rb', line 4 def @options end |
#query ⇒ Object
Returns the value of attribute query.
4 5 6 |
# File 'lib/elasticband/query/multi_match.rb', line 4 def query @query end |
Instance Method Details
#to_h ⇒ Object
12 13 14 |
# File 'lib/elasticband/query/multi_match.rb', line 12 def to_h { multi_match: query_hash } end |