class Aggregations::Buckets::DateHistogramAggregationBuilder
Elasticsearch Date Histogram Aggregation
Constants
- ATTRIBUTES
Public Class Methods
new(name: @name = name.intern)
click to toggle source
@param [String] name : Aggregation name
# File lib/aggregations/buckets/date_histogram_aggregation_builder.rb, line 14 def initialize name: @name = name.intern @type = :date_histogram @query = { @name => { @type => {} } } end
Public Instance Methods
add_order(bucket_order)
click to toggle source
@param [Misc::BucketOrder] bucket_order @return [DateHistogramAggregationBuilder], can be chained for ordering on multiple fields.
# File lib/aggregations/buckets/date_histogram_aggregation_builder.rb, line 26 def add_order bucket_order @order ||= [] @order << bucket_order.settings self end
calendar_interval(interval)
click to toggle source
@param [String] interval @return [DateHistogramAggregationBuilder]
# File lib/aggregations/buckets/date_histogram_aggregation_builder.rb, line 39 def calendar_interval interval @calendar_interval = interval self end
calendar_interval_expr()
click to toggle source
@return [String]
# File lib/aggregations/buckets/date_histogram_aggregation_builder.rb, line 45 def calendar_interval_expr @calendar_interval end
min_doc_count(doc_count)
click to toggle source
@param [Integer] doc_count @return [DateHistogramAggregationBuilder]
# File lib/aggregations/buckets/date_histogram_aggregation_builder.rb, line 51 def min_doc_count doc_count @min_doc_count = doc_count self end
min_doc_count_expr()
click to toggle source
@return [Integer]
# File lib/aggregations/buckets/date_histogram_aggregation_builder.rb, line 57 def min_doc_count_expr @min_doc_count end
order_expr()
click to toggle source
@return [Array]
# File lib/aggregations/buckets/date_histogram_aggregation_builder.rb, line 33 def order_expr @order end