Class: Solr::Query::Request::Boosting::NumericFieldValueMatchBoostFunction

Inherits:
FieldValueMatchBoostFunction show all
Defined in:
lib/solr/query/request/boosting/numeric_field_value_match_boost_function.rb

Instance Attribute Summary

Attributes inherited from FieldValueMatchBoostFunction

#boost_magnitude, #field, #value

Instance Method Summary collapse

Methods inherited from FieldValueMatchBoostFunction

#initialize, #solr_field

Methods included from Support::SchemaHelper

#solarize_field

Constructor Details

This class inherits a constructor from Solr::Query::Request::Boosting::FieldValueMatchBoostFunction

Instance Method Details

#to_solr_sObject



6
7
8
# File 'lib/solr/query/request/boosting/numeric_field_value_match_boost_function.rb', line 6

def to_solr_s
  "if(sub(def(#{solr_field},-1),#{value}),1,#{boost_magnitude})"
end