Sha256: a34071f2c97be135febec6e9f7cfb22a6214f53ea394b5d95d885c6a5c056fcd

Contents?: true

Size: 449 Bytes

Versions: 4

Compression:

Stored size: 449 Bytes

Contents

module Sunspot
  module Facets
    #
    # Encapsulates a query component representing a field facet. Users create
    # instances using DSL::Query#facet
    #
    class FieldFacet #:nodoc:
      def initialize(field)
        @field = field
      end

      # ==== Returns
      #
      # Hash:: solr-ruby params for this field facet
      #
      def to_params
        { :facets => { :fields => [@field.indexed_name] }}
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
outoftime-sunspot-0.7.0 lib/sunspot/facets.rb
outoftime-sunspot-0.7.1 lib/sunspot/facets.rb
outoftime-sunspot-0.7.2 lib/sunspot/facets.rb
outoftime-sunspot-0.7.3 lib/sunspot/facets.rb