Class: Orchestrate::Search::AggregateResult
- Inherits:
-
Object
- Object
- Orchestrate::Search::AggregateResult
- Defined in:
- lib/orchestrate/search/results.rb
Overview
Base object representing an individual Aggregate result
Direct Known Subclasses
Instance Attribute Summary collapse
-
#collection ⇒ Collection
readonly
The collection searched.
-
#count ⇒ Integer
readonly
Number of field values included in the aggregate function.
-
#field_name ⇒ #to_s
readonly
The field name the aggregate function operated over.
-
#kind ⇒ #to_s
readonly
The aggregate kind/type.
Instance Method Summary collapse
-
#initialize(collection, listing) ⇒ AggregateResult
constructor
Initialize a new AggregateResult object.
Constructor Details
#initialize(collection, listing) ⇒ AggregateResult
Initialize a new AggregateResult object
116 117 118 119 120 121 |
# File 'lib/orchestrate/search/results.rb', line 116 def initialize(collection, listing) @collection = collection @kind = listing['aggregate_kind'] @field_name = listing['field_name'] @count = listing['value_count'] end |
Instance Attribute Details
#collection ⇒ Collection (readonly)
Returns The collection searched.
102 103 104 |
# File 'lib/orchestrate/search/results.rb', line 102 def collection @collection end |
#count ⇒ Integer (readonly)
Returns Number of field values included in the aggregate function.
111 112 113 |
# File 'lib/orchestrate/search/results.rb', line 111 def count @count end |
#field_name ⇒ #to_s (readonly)
Returns The field name the aggregate function operated over.
108 109 110 |
# File 'lib/orchestrate/search/results.rb', line 108 def field_name @field_name end |
#kind ⇒ #to_s (readonly)
Returns The aggregate kind/type.
105 106 107 |
# File 'lib/orchestrate/search/results.rb', line 105 def kind @kind end |