Class: Sunspot::Query::FieldFacet
- Inherits:
-
AbstractFieldFacet
- Object
- AbstractFieldFacet
- Sunspot::Query::FieldFacet
- Defined in:
- lib/sunspot/query/field_facet.rb
Instance Method Summary collapse
-
#initialize(field, options) ⇒ FieldFacet
constructor
A new instance of FieldFacet.
- #to_params ⇒ Object
Constructor Details
#initialize(field, options) ⇒ FieldFacet
Returns a new instance of FieldFacet.
4 5 6 7 8 9 10 11 |
# File '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
#to_params ⇒ Object
13 14 15 |
# File 'lib/sunspot/query/field_facet.rb', line 13 def to_params super.merge(:"facet.field" => [field_name_with_local_params]) end |