Sha256: 5f18136c737a999119e7163c53b609891e0f95e00b8cae0986e5b9303c3d5031

Contents?: true

Size: 309 Bytes

Versions: 16

Compression:

Stored size: 309 Bytes

Contents

module Sunspot
  module Query
    class TextFieldBoost #:nodoc:
      attr_reader :boost

      def initialize(field, boost = nil)
        @field, @boost = field, boost
      end

      def to_boosted_field
        @boost ? "#{@field.indexed_name}^#{@boost}" : @field.indexed_name
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
sunspot-2.7.1 lib/sunspot/query/text_field_boost.rb
sunspot-2.7.0 lib/sunspot/query/text_field_boost.rb
sunspot-2.6.0 lib/sunspot/query/text_field_boost.rb
sunspot-2.5.0 lib/sunspot/query/text_field_boost.rb
sunspot-2.4.0 lib/sunspot/query/text_field_boost.rb
sunspot-2.3.0 lib/sunspot/query/text_field_boost.rb
sunspot-2.2.8 lib/sunspot/query/text_field_boost.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/sunspot-2.2.7/lib/sunspot/query/text_field_boost.rb
sunspot-2.2.7 lib/sunspot/query/text_field_boost.rb
sunspot-2.2.6 lib/sunspot/query/text_field_boost.rb
sunspot-2.2.5 lib/sunspot/query/text_field_boost.rb
sunspot-2.2.4 lib/sunspot/query/text_field_boost.rb
sunspot-2.2.3 lib/sunspot/query/text_field_boost.rb
sunspot-2.2.2 lib/sunspot/query/text_field_boost.rb
sunspot-2.2.1 lib/sunspot/query/text_field_boost.rb
sunspot-2.2.0 lib/sunspot/query/text_field_boost.rb