Sha256: 114f818113da5a3fc8c2b16e0def416561cb128754d300f8a3976fd38fc59b2b
Contents?: true
Size: 625 Bytes
Versions: 63
Compression:
Stored size: 625 Bytes
Contents
module Sunspot module Query # # Representation of a BoostQuery, which allows the searcher to specify a # scope for which matching documents should have an extra boost. This is # essentially a conjunction, with an extra instance variable containing # the boost that should be applied. # class BoostQuery < Connective::Conjunction #:nodoc: def initialize(boost) super(false) @boost = boost end def to_boolean_phrase if @boost.is_a?(FunctionQuery) "#{@boost}" else "#{super}^#{@boost}" end end end end end
Version data entries
63 entries across 63 versions & 12 rubygems