Class: Sunspot::Query::FieldFacet
- Inherits:
-
AbstractFieldFacet
- Object
- AbstractFieldFacet
- Sunspot::Query::FieldFacet
- Defined in:
- sunspot/lib/sunspot/query/field_facet.rb
Instance Method Summary (collapse)
-
- (FieldFacet) initialize(field, options)
constructor
A new instance of FieldFacet.
- - (Object) to_params
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, ) if exclude_filters = [: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 |