Class: Sunspot::Search::FieldStats
Instance Attribute Summary
Attributes inherited from StatsRow
#instance, #value
Instance Method Summary
collapse
Methods inherited from StatsRow
#count, #facet, #facets, #inspect, #max, #mean, #min, #missing, #standard_deviation, #sum, #sum_of_squares
Constructor Details
#initialize(field, search) ⇒ FieldStats
4
5
6
|
# File 'lib/sunspot/search/field_stats.rb', line 4
def initialize(field, search) @field, @search, @facet_fields = field, search, []
end
|
Instance Method Details
#add_facet(field) ⇒ Object
8
9
10
|
# File 'lib/sunspot/search/field_stats.rb', line 8
def add_facet field
@facet_fields << field
end
|
#data ⇒ Object
16
17
18
|
# File 'lib/sunspot/search/field_stats.rb', line 16
def data
@search.stats_response[@field.indexed_name]
end
|
#field_name ⇒ Object
12
13
14
|
# File 'lib/sunspot/search/field_stats.rb', line 12
def field_name
@field.name
end
|