class Solr::Query::Request::Boosting
Attributes
additive_boost_functions[R]
multiplicative_boost_functions[R]
phrase_boosts[R]
spatial_boost[R]
Public Class Methods
empty()
click to toggle source
# File lib/solr/query/request/boosting.rb, line 19 def empty @empty ||= new end
new(additive_boost_functions: [], multiplicative_boost_functions: [], phrase_boosts: [])
click to toggle source
# File lib/solr/query/request/boosting.rb, line 26 def initialize(additive_boost_functions: [], multiplicative_boost_functions: [], phrase_boosts: []) @additive_boost_functions = additive_boost_functions @multiplicative_boost_functions = multiplicative_boost_functions @phrase_boosts = phrase_boosts @spatial_boost = find_spatial_boost freeze end
Public Instance Methods
empty?()
click to toggle source
# File lib/solr/query/request/boosting.rb, line 34 def empty? [multiplicative_boost_functions, additive_boost_functions, phrase_boosts].all(&:empty?) end
Private Instance Methods
find_spatial_boost()
click to toggle source
# File lib/solr/query/request/boosting.rb, line 40 def find_spatial_boost multiplicative_boost_functions.find { |mbf| mbf.is_a? ::Solr::Query::Request::Boosting::GeodistFunction } end