public class DelegatingSearchAggregationFactory<PDF extends SearchPredicateFactory> extends Object implements ExtendedSearchAggregationFactory<PDF>
SearchAggregationFactory.
Mainly useful when implementing a SearchAggregationFactoryExtension.
| Constructor and Description |
|---|
DelegatingSearchAggregationFactory(SearchAggregationFactory delegate,
SearchAggregationDslContext<?,? extends PDF> dslContext) |
| 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<PDF> |
range()
Perform aggregation in range buckets.
|
TermsAggregationFieldStep<PDF> |
terms()
Perform aggregation in term buckets.
|
public DelegatingSearchAggregationFactory(SearchAggregationFactory delegate, SearchAggregationDslContext<?,? extends PDF> dslContext)
public RangeAggregationFieldStep<PDF> 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 ExtendedSearchAggregationFactory<PDF extends SearchPredicateFactory>range in interface SearchAggregationFactorypublic TermsAggregationFieldStep<PDF> 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 ExtendedSearchAggregationFactory<PDF extends SearchPredicateFactory>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.