Class: Sunspot::QueryFacetRow

Inherits:
Object
  • Object
show all
Defined in:
lib/sunspot/query_facet_row.rb

Overview

Objects of this class encapsulate a single query facet row returned for a query facet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, count) ⇒ QueryFacetRow

:nodoc:



17
18
19
# File 'lib/sunspot/query_facet_row.rb', line 17

def initialize(value, count) #:nodoc:
  @value, @count = value, count
end

Instance Attribute Details

#countObject (readonly)

Number of documents in the result set that match this facet’s scope.



15
16
17
# File 'lib/sunspot/query_facet_row.rb', line 15

def count
  @count
end

#valueObject (readonly)

This is the “label” passed into the query facet row when it is defined in the search.



11
12
13
# File 'lib/sunspot/query_facet_row.rb', line 11

def value
  @value
end