Class: Solr::Query::Request::Boosting::FieldValueMatchBoostFunction

Inherits:
Object
  • Object
show all
Includes:
Support::SchemaHelper
Defined in:
lib/solr/query/request/boosting/field_value_match_boost_function.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Support::SchemaHelper

#solarize_field

Constructor Details

#initialize(field:, value:, boost_magnitude:) ⇒ FieldValueMatchBoostFunction

Returns a new instance of FieldValueMatchBoostFunction.



10
11
12
13
14
15
# File 'lib/solr/query/request/boosting/field_value_match_boost_function.rb', line 10

def initialize(field:, value:, boost_magnitude:)
  @field = field
  @value = value
  @boost_magnitude = boost_magnitude
  freeze
end

Instance Attribute Details

#boost_magnitudeObject (readonly)

Returns the value of attribute boost_magnitude.



8
9
10
# File 'lib/solr/query/request/boosting/field_value_match_boost_function.rb', line 8

def boost_magnitude
  @boost_magnitude
end

#fieldObject (readonly)

Returns the value of attribute field.



8
9
10
# File 'lib/solr/query/request/boosting/field_value_match_boost_function.rb', line 8

def field
  @field
end

#valueObject (readonly)

Returns the value of attribute value.



8
9
10
# File 'lib/solr/query/request/boosting/field_value_match_boost_function.rb', line 8

def value
  @value
end

Instance Method Details

#solr_fieldObject



17
18
19
# File 'lib/solr/query/request/boosting/field_value_match_boost_function.rb', line 17

def solr_field
  solarize_field(field)
end