Sha256: 6bb6e7b68aedd3eae08f223f2ef3733ab0b72c43163d84a16d99c3f23a582551

Contents?: true

Size: 537 Bytes

Versions: 18

Compression:

Stored size: 537 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
        "#{super}^#{@boost}"
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
sunspot-1.0.5 lib/sunspot/query/boost_query.rb
sunspot-1.0.4 lib/sunspot/query/boost_query.rb
sunspot-1.0.3 lib/sunspot/query/boost_query.rb
sunspot-1.0.2 lib/sunspot/query/boost_query.rb
sunspot-1.0.1 lib/sunspot/query/boost_query.rb
sunspot-1.0.0 lib/sunspot/query/boost_query.rb
sunspot-0.10.9 lib/sunspot/query/boost_query.rb
sunspot-0.10.8 lib/sunspot/query/boost_query.rb
nxa-sunspot-0.10.7 lib/sunspot/query/boost_query.rb
sunspot-0.10.7 lib/sunspot/query/boost_query.rb
sunspot-0.10.6 lib/sunspot/query/boost_query.rb
sunspot-0.10.5 lib/sunspot/query/boost_query.rb
sunspot-0.10.4 lib/sunspot/query/boost_query.rb
kuahyeow-sunspot-0.10.3 lib/sunspot/query/boost_query.rb
sunspot-0.10.3 lib/sunspot/query/boost_query.rb
sunspot-0.10.2 lib/sunspot/query/boost_query.rb
sunspot-0.10.1 lib/sunspot/query/boost_query.rb
sunspot-0.10.0 lib/sunspot/query/boost_query.rb