Class: Sunspot::Facet
- Inherits:
-
Object
- Object
- Sunspot::Facet
- Defined in:
- lib/sunspot/facet.rb
Overview
The facet class encapsulates the information returned by Solr for a particular facet request.
See wiki.apache.org/solr/SolrFacetingOverview for more information on Solr’s faceting capabilities.
Instance Method Summary collapse
-
#field_name ⇒ Object
The name of the field that contains this facet’s values.
-
#initialize(facet_values, field) ⇒ Facet
constructor
:nodoc:.
-
#rows ⇒ Object
The rows returned for this facet.
Constructor Details
#initialize(facet_values, field) ⇒ Facet
:nodoc:
10 11 12 |
# File 'lib/sunspot/facet.rb', line 10 def initialize(facet_values, field) #:nodoc: @facet_values, @field = facet_values, field end |
Instance Method Details
#field_name ⇒ Object
The name of the field that contains this facet’s values
Returns
- Symbol
-
The field name
20 21 22 |
# File 'lib/sunspot/facet.rb', line 20 def field_name @field.name end |