class Orchestrate::Search::AggregateResult

Base object representing an individual Aggregate result

Attributes

collection[R]

@return [Collection] The collection searched.

count[R]

@return [Integer] Number of field values included in the aggregate function.

field_name[R]

@return [#to_s] The field name the aggregate function operated over.

kind[R]

@return [#to_s] The aggregate kind/type

Public Class Methods

new(collection, listing) click to toggle source

Initialize a new AggregateResult object @param collection [Orchestrate::Collection] The collection searched. @param listing [#to_json] The aggregate result returned from the search.

# 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