Sha256: 42ab558fd7e5d9a3b882a147a66b021eaae580686c6a4e2ecea2ed961cb31467

Contents?: true

Size: 447 Bytes

Versions: 9

Compression:

Stored size: 447 Bytes

Contents

module Sunspot
  class Query
    #
    # 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

9 entries across 9 versions & 2 rubygems

Version Path
outoftime-sunspot-0.8.0 lib/sunspot/query/field_facet.rb
outoftime-sunspot-0.8.1 lib/sunspot/query/field_facet.rb
outoftime-sunspot-0.8.2 lib/sunspot/query/field_facet.rb
outoftime-sunspot-0.8.3 lib/sunspot/query/field_facet.rb
outoftime-sunspot-0.8.4 lib/sunspot/query/field_facet.rb
outoftime-sunspot-0.8.5 lib/sunspot/query/field_facet.rb
outoftime-sunspot-0.8.8 lib/sunspot/query/field_facet.rb
outoftime-sunspot-0.8.9 lib/sunspot/query/field_facet.rb
pallan-sunspot-0.8.3 lib/sunspot/query/field_facet.rb