Class: Elasticband::Query::ScoreFunction::BoostFactor
- Inherits:
-
Elasticband::Query::ScoreFunction
- Object
- Elasticband::Query::ScoreFunction
- Elasticband::Query::ScoreFunction::BoostFactor
- Defined in:
- lib/elasticband/query/score_function/boost_factor.rb
Instance Attribute Summary collapse
-
#boost ⇒ Object
Returns the value of attribute boost.
Instance Method Summary collapse
-
#initialize(boost) ⇒ BoostFactor
constructor
A new instance of BoostFactor.
- #to_h ⇒ Object
Constructor Details
#initialize(boost) ⇒ BoostFactor
Returns a new instance of BoostFactor.
7 8 9 |
# File 'lib/elasticband/query/score_function/boost_factor.rb', line 7 def initialize(boost) self.boost = boost end |
Instance Attribute Details
#boost ⇒ Object
Returns the value of attribute boost.
5 6 7 |
# File 'lib/elasticband/query/score_function/boost_factor.rb', line 5 def boost @boost end |
Instance Method Details
#to_h ⇒ Object
11 12 13 |
# File 'lib/elasticband/query/score_function/boost_factor.rb', line 11 def to_h { boost_factor: boost } end |