public interface SearchAggregationFactory
| 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.
|
RangeAggregationFieldStep |
range()
Perform aggregation in range buckets.
|
TermsAggregationFieldStep |
terms()
Perform aggregation in term buckets.
|
RangeAggregationFieldStep range()
Given 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.
TermsAggregationFieldStep terms()
Given 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.
<T> T extension(SearchAggregationFactoryExtension<T> extension)
T - The type of factory provided by the extension.extension - The extension to the aggregation DSL.SearchException - If the extension cannot be applied (wrong underlying backend, ...).Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.