Class DelegatingSearchAggregationFactory<PDF extends SearchPredicateFactory>
- java.lang.Object
-
- org.hibernate.search.engine.search.aggregation.dsl.spi.DelegatingSearchAggregationFactory<PDF>
-
- All Implemented Interfaces:
ExtendedSearchAggregationFactory<PDF>
,SearchAggregationFactory
public class DelegatingSearchAggregationFactory<PDF extends SearchPredicateFactory> extends Object implements ExtendedSearchAggregationFactory<PDF>
A delegatingSearchAggregationFactory
.Mainly useful when implementing a
SearchAggregationFactoryExtension
.
-
-
Constructor Summary
Constructors Constructor Description DelegatingSearchAggregationFactory(SearchAggregationFactory delegate, SearchAggregationDslContext<?,? extends PDF> dslContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SearchAggregationFactory
delegate()
<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<PDF>
range()
Perform aggregation in range buckets.TermsAggregationFieldStep<PDF>
terms()
Perform aggregation in term buckets.
-
-
-
Constructor Detail
-
DelegatingSearchAggregationFactory
public DelegatingSearchAggregationFactory(SearchAggregationFactory delegate, SearchAggregationDslContext<?,? extends PDF> dslContext)
-
-
Method Detail
-
range
public RangeAggregationFieldStep<PDF> range()
Description copied from interface:SearchAggregationFactory
Perform aggregation in range buckets.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.
- Specified by:
range
in interfaceExtendedSearchAggregationFactory<PDF extends SearchPredicateFactory>
- Specified by:
range
in interfaceSearchAggregationFactory
- Returns:
- The next step.
-
terms
public TermsAggregationFieldStep<PDF> terms()
Description copied from interface:SearchAggregationFactory
Perform aggregation in term buckets.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.
- Specified by:
terms
in interfaceExtendedSearchAggregationFactory<PDF extends SearchPredicateFactory>
- Specified by:
terms
in interfaceSearchAggregationFactory
- Returns:
- The next step.
-
extension
public <T> T extension(SearchAggregationFactoryExtension<T> extension)
Description copied from interface:SearchAggregationFactory
Extend the current factory with the given extension, resulting in an extended factory offering different types of aggregations.- Specified by:
extension
in interfaceSearchAggregationFactory
- Type Parameters:
T
- The type of factory provided by the extension.- Parameters:
extension
- The extension to the aggregation DSL.- Returns:
- The extended factory.
-
delegate
protected SearchAggregationFactory delegate()
-
-