Class: Arelastic::Queries::MultiMatch
- Inherits:
-
Query
- Object
- Nodes::Node
- Query
- Arelastic::Queries::MultiMatch
- Defined in:
- lib/arelastic/queries/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
- #as_elastic ⇒ Object
-
#initialize(fields, query, options = {}) ⇒ MultiMatch
constructor
A new instance of MultiMatch.
Methods inherited from Query
Methods inherited from Nodes::Node
#==, #convert_to_elastic, #read_option!
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(fields, query, options = {}) ⇒ MultiMatch
Returns a new instance of MultiMatch.
5 6 7 8 9 |
# File 'lib/arelastic/queries/multi_match.rb', line 5 def initialize(fields, query, = {}) @fields = fields @query = query @options = end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
4 5 6 |
# File 'lib/arelastic/queries/multi_match.rb', line 4 def fields @fields end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/arelastic/queries/multi_match.rb', line 4 def @options end |
#query ⇒ Object
Returns the value of attribute query.
4 5 6 |
# File 'lib/arelastic/queries/multi_match.rb', line 4 def query @query end |
Instance Method Details
#as_elastic ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/arelastic/queries/multi_match.rb', line 11 def as_elastic { "multi_match" => { "fields" => convert_to_elastic(fields), "query" => convert_to_elastic(query) }.merge() } end |