Class: Orchestrate::Search::TimeSeriesResult

Inherits:
RangeResult show all
Defined in:
lib/orchestrate/search/results.rb

Overview

Time Series Aggregate result object

Instance Attribute Summary collapse

Attributes inherited from RangeResult

#buckets

Attributes inherited from AggregateResult

#collection, #count, #field_name, #kind

Instance Method Summary collapse

Constructor Details

#initialize(collection, listing) ⇒ TimeSeriesResult

Initialize a new TimeSeriesResult object

Parameters:

  • collection (Orchestrate::Collection)

    The collection searched.

  • listing (#to_json)

    The aggregate result returned from the search.



212
213
214
215
# File 'lib/orchestrate/search/results.rb', line 212

def initialize(collection, listing)
  super(collection, listing)
  @interval = listing['interval']
end

Instance Attribute Details

#interval#to_s (readonly)

Returns Time interval.

Returns:

  • (#to_s)

    Time interval



207
208
209
# File 'lib/orchestrate/search/results.rb', line 207

def interval
  @interval
end

Instance Method Details

#to_sObject Also known as: inspect

Returns Pretty-Printed string representation of the TimeSeriesResult object.

Returns:

  • Pretty-Printed string representation of the TimeSeriesResult object



218
219
220
# File 'lib/orchestrate/search/results.rb', line 218

def to_s
  "#<Orchestrate::Search::TimeSeriesResult collection=#{collection.name} field_name=#{field_name} interval=#{interval} buckets=#{buckets}>"
end