Module: Aggregations::Helpers::AggregationQueryBuilderHelper
- Included in:
- Buckets::DateHistogramAggregationBuilder, Buckets::DateRangeAggregationBuilder, Buckets::FilterAggregationBuilder, Buckets::FiltersAggregationBuilder, Buckets::GeoGridAggregationBuilder, Buckets::HistogramAggregationBuilder, Buckets::NestedAggregationBuilder, Buckets::RangeAggregationBuilder, Buckets::ReverseNestedAggregationBuilder, Buckets::TermsAggregationBuilder, Buckets::TopHitsAggregationBuilder, Metrics::AvgAggregationBuilder, Metrics::MaxAggregationBuilder, Metrics::MinAggregationBuilder
- Defined in:
- lib/aggregations/helpers/aggregation_query_builder_helper.rb
Constant Summary collapse
- OBJECT_ARRAY_SETTINGS_FIELDS =
[:order]
- OBJECT_ARRAY_QUERY_FIELDS =
[:sort]
Instance Method Summary collapse
-
#name_expr ⇒ String
: Aggregation name.
-
#query ⇒ Hash
(also: #query_expr)
: Aggregation query.
-
#type_expr ⇒ String
: Aggregation type.
Instance Method Details
#name_expr ⇒ String
Returns : Aggregation name.
10 11 12 |
# File 'lib/aggregations/helpers/aggregation_query_builder_helper.rb', line 10 def name_expr @name.to_s end |
#query ⇒ Hash Also known as: query_expr
Returns : Aggregation query.
20 21 22 23 24 25 26 |
# File 'lib/aggregations/helpers/aggregation_query_builder_helper.rb', line 20 def query add_value_source_agg_builder if self.class.included_modules.include?(ValuesSourceAggregationHelper) add_abstract_agg_builder if self.class.included_modules.include?(AbstractAggregationHelper) add_abstract_range_builder if self.class.included_modules.include?(AbstractRangeHelper) add_class_attributes if ("#{self.class.name}::ATTRIBUTES".constantize rescue nil).present? @query end |
#type_expr ⇒ String
Returns : Aggregation type.
15 16 17 |
# File 'lib/aggregations/helpers/aggregation_query_builder_helper.rb', line 15 def type_expr @type.to_s end |