public class DelegatingSearchAggregationFactory extends Object implements SearchAggregationFactory
SearchAggregationFactory.
Mainly useful when implementing a SearchAggregationFactoryExtension.
| Constructor and Description |
|---|
DelegatingSearchAggregationFactory(SearchAggregationFactory delegate) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
extension(SearchAggregationFactoryExtension<T> extension)
Extend the current factory with the given extension,
resulting in an extended factory offering different types of aggregations.
|
protected SearchAggregationFactory |
getDelegate() |
RangeAggregationFieldStep |
range()
Perform aggregation in range buckets.
|
TermsAggregationFieldStep |
terms()
Perform aggregation in term buckets.
|
public DelegatingSearchAggregationFactory(SearchAggregationFactory delegate)
public RangeAggregationFieldStep range()
SearchAggregationFactoryGiven a field and one or more ranges of values, this aggregation creates one bucket per range, and puts in each bucket every document for which the given field has a value that falls into the corresponding range.
For each bucket, the document count is computed, or more complex metrics or sub-aggregations for backends that support it.
range in interface SearchAggregationFactorypublic TermsAggregationFieldStep terms()
SearchAggregationFactoryGiven a field, this aggregation creates one bucket per term of that field in the index, and puts in each bucket every document for which the given field matches the corresponding term.
For each bucket, the document count is computed, or more complex metrics or sub-aggregations for backends that support it.
terms in interface SearchAggregationFactorypublic <T> T extension(SearchAggregationFactoryExtension<T> extension)
SearchAggregationFactoryextension in interface SearchAggregationFactoryT - The type of factory provided by the extension.extension - The extension to the aggregation DSL.protected SearchAggregationFactory getDelegate()
Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.