Class: Elasticband::Query::FunctionScore
- Inherits:
-
Elasticband::Query
- Object
- Elasticband::Query
- Elasticband::Query::FunctionScore
- Defined in:
- lib/elasticband/query/function_score.rb
Instance Attribute Summary collapse
-
#boost_mode ⇒ Object
Returns the value of attribute boost_mode.
-
#function ⇒ Object
Returns the value of attribute function.
-
#query_or_filter ⇒ Object
Returns the value of attribute query_or_filter.
-
#score_mode ⇒ Object
Returns the value of attribute score_mode.
Instance Method Summary collapse
-
#initialize(query_or_filter, function, score_mode, boost_mode) ⇒ FunctionScore
constructor
A new instance of FunctionScore.
- #to_h ⇒ Object
Methods inherited from Elasticband::Query
Constructor Details
#initialize(query_or_filter, function, score_mode, boost_mode) ⇒ FunctionScore
Returns a new instance of FunctionScore.
6 7 8 9 10 11 |
# File 'lib/elasticband/query/function_score.rb', line 6 def initialize(query_or_filter, function, score_mode, boost_mode) self.query_or_filter = query_or_filter self.function = function self.score_mode = score_mode self.boost_mode = boost_mode end |
Instance Attribute Details
#boost_mode ⇒ Object
Returns the value of attribute boost_mode.
4 5 6 |
# File 'lib/elasticband/query/function_score.rb', line 4 def boost_mode @boost_mode end |
#function ⇒ Object
Returns the value of attribute function.
4 5 6 |
# File 'lib/elasticband/query/function_score.rb', line 4 def function @function end |
#query_or_filter ⇒ Object
Returns the value of attribute query_or_filter.
4 5 6 |
# File 'lib/elasticband/query/function_score.rb', line 4 def query_or_filter @query_or_filter end |
#score_mode ⇒ Object
Returns the value of attribute score_mode.
4 5 6 |
# File 'lib/elasticband/query/function_score.rb', line 4 def score_mode @score_mode end |
Instance Method Details
#to_h ⇒ Object
13 14 15 |
# File 'lib/elasticband/query/function_score.rb', line 13 def to_h { function_score: function_score_hash } end |