class Solr::Query::Request::Boosting::LnFunctionBoost

Attributes

boost_magnitude[R]
field[R]
min[R]

Public Class Methods

new(field:, min: 0.69, boost_magnitude: 1) click to toggle source
# File lib/solr/query/request/boosting/ln_function_boost.rb, line 10
def initialize(field:, min: 0.69, boost_magnitude: 1)
  @field = field
  @min = min
  @boost_magnitude = boost_magnitude
  freeze
end

Public Instance Methods

solr_field() click to toggle source
# File lib/solr/query/request/boosting/ln_function_boost.rb, line 21
def solr_field
  solarize_field(field)
end
to_solr_s() click to toggle source
# File lib/solr/query/request/boosting/ln_function_boost.rb, line 17
def to_solr_s
  "mul(if(gt(#{solr_field},1),ln(#{solr_field}),#{min}),#{boost_magnitude})"
end