Class AbstractSearchAggregationFactory<S extends ExtendedSearchAggregationFactory<S,PDF>,SC extends SearchAggregationIndexScope<?>,PDF extends SearchPredicateFactory>
java.lang.Object
org.hibernate.search.engine.search.aggregation.dsl.spi.AbstractSearchAggregationFactory<S,SC,PDF>
- All Implemented Interfaces:
ExtendedSearchAggregationFactory<S,,PDF> SearchAggregationFactory
public abstract class AbstractSearchAggregationFactory<S extends ExtendedSearchAggregationFactory<S,PDF>,SC extends SearchAggregationIndexScope<?>,PDF extends SearchPredicateFactory>
extends Object
implements ExtendedSearchAggregationFactory<S,PDF>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSearchAggregationFactory(SearchAggregationDslContext<SC, PDF> dslContext) -
Method Summary
Modifier and TypeMethodDescription<T> Textension(SearchAggregationFactoryExtension<T> extension) Extend the current factory with the given extension, resulting in an extended factory offering different types of aggregations.range()Perform aggregation in range buckets.terms()Perform aggregation in term buckets.final StringtoAbsolutePath(String relativeFieldPath) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.search.aggregation.dsl.ExtendedSearchAggregationFactory
withRoot
-
Field Details
-
dslContext
protected final SearchAggregationDslContext<SC extends SearchAggregationIndexScope<?>,PDF extends SearchPredicateFactory> dslContext
-
-
Constructor Details
-
AbstractSearchAggregationFactory
-
-
Method Details
-
range
Description copied from interface:SearchAggregationFactoryPerform 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:
rangein interfaceExtendedSearchAggregationFactory<S extends ExtendedSearchAggregationFactory<S,PDF>, SC extends SearchAggregationIndexScope<?>> - Specified by:
rangein interfaceSearchAggregationFactory- Returns:
- The next step.
-
terms
Description copied from interface:SearchAggregationFactoryPerform 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:
termsin interfaceExtendedSearchAggregationFactory<S extends ExtendedSearchAggregationFactory<S,PDF>, SC extends SearchAggregationIndexScope<?>> - Specified by:
termsin interfaceSearchAggregationFactory- Returns:
- The next step.
-
extension
Description copied from interface:SearchAggregationFactoryExtend the current factory with the given extension, resulting in an extended factory offering different types of aggregations.- Specified by:
extensionin interfaceSearchAggregationFactory- Type Parameters:
T- The type of factory provided by the extension.- Parameters:
extension- The extension to the aggregation DSL.- Returns:
- The extended factory.
-
toAbsolutePath
- Specified by:
toAbsolutePathin interfaceSearchAggregationFactory- Parameters:
relativeFieldPath- The path to a field, relative to therootof this factory.- Returns:
- The absolute path of the field, for use in native aggregations for example. Note the path is returned even if the field doesn't exist.
-