Class: Sunspot::Query::FieldFacet

Inherits:
AbstractFieldFacet show all
Defined in:
sunspot/lib/sunspot/query/field_facet.rb

Instance Method Summary (collapse)

Constructor Details

- (FieldFacet) initialize(field, options)

A new instance of FieldFacet



4
5
6
7
8
9
10
11
# File 'sunspot/lib/sunspot/query/field_facet.rb', line 4

def initialize(field, options)
  if exclude_filters = options[:exclude]
    @exclude_tag = Util.Array(exclude_filters).map do |filter|
      filter.tag
    end.join(',')
  end
  super
end

Instance Method Details

- (Object) to_params



13
14
15
# File 'sunspot/lib/sunspot/query/field_facet.rb', line 13

def to_params
  super.merge(:facet.field" => [field_name_with_local_params])
end