Class: Eson::Search::DisMax
- Inherits:
-
Object
- Object
- Eson::Search::DisMax
- Defined in:
- lib/eson/search/dis_max.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Attributes included from Queries
Instance Method Summary collapse
-
#dis_max { ... } ⇒ self
Generates a ‘dis_max` query in a query context.
-
#initialize(options = {}) ⇒ DisMax
constructor
A new instance of DisMax.
- #to_query_hash ⇒ Object
Methods included from Queries
Methods included from Query
Constructor Details
#initialize(options = {}) ⇒ DisMax
Returns a new instance of DisMax.
12 13 14 |
# File 'lib/eson/search/dis_max.rb', line 12 def initialize( = {}) self. = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Eson::Search::Query
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
10 11 12 |
# File 'lib/eson/search/dis_max.rb', line 10 def @options end |
Instance Method Details
#dis_max { ... } ⇒ self
8 |
# File 'lib/eson/search/dis_max.rb', line 8 short_name :dis_max |
#to_query_hash ⇒ Object
16 17 18 |
# File 'lib/eson/search/dis_max.rb', line 16 def to_query_hash {name => {:queries => queries.to_query_hash}.merge() } end |