Class: Aggregations::Buckets::DateRangeAggregationBuilder

Inherits:
Object
  • Object
show all
Includes:
Helpers::AbstractAggregationHelper, Helpers::AbstractRangeHelper, Helpers::AggregationQueryBuilderHelper, Helpers::ValuesSourceAggregationHelper, AttributesReader
Defined in:
lib/aggregations/buckets/date_range_aggregation_builder.rb

Overview

Elasticsearch Date Range Aggregation

Constant Summary

Constants included from Helpers::AggregationQueryBuilderHelper

Helpers::AggregationQueryBuilderHelper::OBJECT_ARRAY_QUERY_FIELDS, Helpers::AggregationQueryBuilderHelper::OBJECT_ARRAY_SETTINGS_FIELDS

Instance Method Summary collapse

Methods included from AttributesReader

#attributes

Methods included from Helpers::AggregationQueryBuilderHelper

#name_expr, #query, #type_expr

Methods included from Helpers::AbstractRangeHelper

#abstract_range_builder, #add_range, #keyed, #keyed_expr, #ranges_expr

Methods included from Helpers::AbstractAggregationHelper

#abstract_agg_builder, #sub_aggregation, #sub_aggregation_expr

Methods included from Helpers::ValuesSourceAggregationHelper

#field, #field_expr, #missing, #missing_expr, #script, #script_expr, #value_source_agg_builder

Constructor Details

#initialize(name:) ⇒ DateRangeAggregationBuilder

Returns a new instance of DateRangeAggregationBuilder.

Parameters:

  • name (String)

    : Aggregation name



13
14
15
16
17
18
19
20
21
# File 'lib/aggregations/buckets/date_range_aggregation_builder.rb', line 13

def initialize name:
  @name = name.intern
  @type = :date_range
  @query = {
    @name => {
      @type => {}
    }
  }
end