Class: Sunspot::Query::QueryFieldFacet
- Inherits:
-
QueryFacet
- Object
- QueryFacet
- Sunspot::Query::QueryFieldFacet
- Defined in:
- lib/sunspot/query/query_field_facet.rb
Instance Attribute Summary
Attributes inherited from QueryFacet
Instance Method Summary collapse
-
#initialize(field, values) ⇒ QueryFieldFacet
constructor
A new instance of QueryFieldFacet.
Methods inherited from QueryFacet
Constructor Details
#initialize(field, values) ⇒ QueryFieldFacet
Returns a new instance of QueryFieldFacet.
4 5 6 7 8 9 10 |
# File 'lib/sunspot/query/query_field_facet.rb', line 4 def initialize(field, values) super(field.name) @field = field values.each do |value| add_row(value).add_component(Restriction::EqualTo.new(field, value)) end end |