Class: Solr::Query::Request::Boosting
- Inherits:
-
Object
- Object
- Solr::Query::Request::Boosting
- Defined in:
- lib/solr/query/request/boosting.rb,
lib/solr/query/request/boosting/geodist_function.rb,
lib/solr/query/request/boosting/ln_function_boost.rb,
lib/solr/query/request/boosting/scale_function_boost.rb,
lib/solr/query/request/boosting/exists_boost_function.rb,
lib/solr/query/request/boosting/phrase_proximity_boost.rb,
lib/solr/query/request/boosting/dictionary_boost_function.rb,
lib/solr/query/request/boosting/ranking_field_boost_function.rb,
lib/solr/query/request/boosting/field_value_match_boost_function.rb,
lib/solr/query/request/boosting/recent_field_value_boost_function.rb,
lib/solr/query/request/boosting/field_value_less_than_boost_function.rb,
lib/solr/query/request/boosting/numeric_field_value_match_boost_function.rb,
lib/solr/query/request/boosting/textual_field_value_match_boost_function.rb
Defined Under Namespace
Classes: DictionaryBoostFunction, ExistsBoostFunction, FieldValueLessThanBoostFunction, FieldValueMatchBoostFunction, GeodistFunction, LnFunctionBoost, NumericFieldValueMatchBoostFunction, PhraseProximityBoost, RankingFieldBoostFunction, RecentFieldValueBoostFunction, ScaleFunctionBoost, TextualFieldValueMatchBoostFunction
Instance Attribute Summary collapse
-
#additive_boost_functions ⇒ Object
readonly
Returns the value of attribute additive_boost_functions.
-
#multiplicative_boost_functions ⇒ Object
readonly
Returns the value of attribute multiplicative_boost_functions.
-
#phrase_boosts ⇒ Object
readonly
Returns the value of attribute phrase_boosts.
-
#spatial_boost ⇒ Object
readonly
Returns the value of attribute spatial_boost.
Class Method Summary collapse
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(additive_boost_functions: [], multiplicative_boost_functions: [], phrase_boosts: []) ⇒ Boosting
constructor
A new instance of Boosting.
Constructor Details
#initialize(additive_boost_functions: [], multiplicative_boost_functions: [], phrase_boosts: []) ⇒ Boosting
Returns a new instance of Boosting.
26 27 28 29 30 31 32 |
# 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 |
Instance Attribute Details
#additive_boost_functions ⇒ Object (readonly)
Returns the value of attribute additive_boost_functions.
24 25 26 |
# File 'lib/solr/query/request/boosting.rb', line 24 def additive_boost_functions @additive_boost_functions end |
#multiplicative_boost_functions ⇒ Object (readonly)
Returns the value of attribute multiplicative_boost_functions.
24 25 26 |
# File 'lib/solr/query/request/boosting.rb', line 24 def multiplicative_boost_functions @multiplicative_boost_functions end |
#phrase_boosts ⇒ Object (readonly)
Returns the value of attribute phrase_boosts.
24 25 26 |
# File 'lib/solr/query/request/boosting.rb', line 24 def phrase_boosts @phrase_boosts end |
#spatial_boost ⇒ Object (readonly)
Returns the value of attribute spatial_boost.
24 25 26 |
# File 'lib/solr/query/request/boosting.rb', line 24 def spatial_boost @spatial_boost end |
Class Method Details
.empty ⇒ Object
19 20 21 |
# File 'lib/solr/query/request/boosting.rb', line 19 def empty @empty ||= new end |
Instance Method Details
#empty? ⇒ Boolean
34 35 36 |
# File 'lib/solr/query/request/boosting.rb', line 34 def empty? [multiplicative_boost_functions, additive_boost_functions, phrase_boosts].all(&:empty?) end |