Class: Elasticband::Query::ScoreFunction::BoostFactor

Inherits:
Elasticband::Query::ScoreFunction show all
Defined in:
lib/elasticband/query/score_function/boost_factor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#boostObject

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_hObject



11
12
13
# File 'lib/elasticband/query/score_function/boost_factor.rb', line 11

def to_h
  { boost_factor: boost }
end