class Solr::Query::Request::Boosting::ExistsBoostFunction

Attributes

boost_magnitude[R]
field[R]

Public Class Methods

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

Public Instance Methods

solr_field() click to toggle source
# File lib/solr/query/request/boosting/exists_boost_function.rb, line 20
def solr_field
  solarize_field(field)
end
to_solr_s() click to toggle source
# File lib/solr/query/request/boosting/exists_boost_function.rb, line 16
def to_solr_s
  "if(exists(#{solr_field}),#{boost_magnitude},1)"
end