Sha256: b8d17742d5411b5fa7253e41b7661b1e541248db5a10ce3b1300a39e9fc12491

Contents?: true

Size: 328 Bytes

Versions: 20

Compression:

Stored size: 328 Bytes

Contents

module Sunspot
  module Query
    class TextFieldBoost #:nodoc:
      def initialize(field, boost = nil)
        @field, @boost = field, boost
      end

      def to_boosted_field
        boosted_field = @field.indexed_name
        boosted_field.concat("^#{@boost}") if @boost
        boosted_field
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 4 rubygems

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