Interface ExtendedSearchAggregationFactory<SR,S extends ExtendedSearchAggregationFactory<SR,?,PDF>,PDF extends TypedSearchPredicateFactory<SR>>
- Type Parameters:
SR- Scope root type.S- The self type, i.e. the exposed type of this factory.PDF- The type of factory used to create predicates inAggregationFilterStep.filter(Function).
- All Superinterfaces:
SearchAggregationFactory,TypedSearchAggregationFactory<SR>
- All Known Implementing Classes:
AbstractSearchAggregationFactory
TypedSearchAggregationFactory allowing to
easily override the self type and predicate factory type for all relevant methods.
Warning: Generic parameters of this type are subject to change, so this type should not be referenced directly in user code.
-
Method Summary
Modifier and TypeMethodDescriptionavg()Perform the avg metric aggregation.count()Perform the count metric aggregation.Perform the count distinct metric aggregation.max()Perform the max metric aggregation.min()Perform the min metric aggregation.range()Perform aggregation in range buckets.sum()Perform the sum metric aggregation.terms()Perform aggregation in term buckets.Create a new aggregation factory whose root for all paths passed to the DSL will be the given object field.Methods inherited from interface org.hibernate.search.engine.search.aggregation.dsl.SearchAggregationFactory
extension, toAbsolutePath, withParameters
-
Method Details
-
withRoot
Description copied from interface:TypedSearchAggregationFactoryCreate a new aggregation factory whose root for all paths passed to the DSL will be the given object field.See here for more information.
- Specified by:
withRootin interfaceSearchAggregationFactory- Specified by:
withRootin interfaceTypedSearchAggregationFactory<SR>- Parameters:
objectFieldPath- The path from the current root to an object field that will become the new root.- Returns:
- A new aggregation factory using the given object field as root.
-
range
RangeAggregationFieldStep<SR,PDF> range()Description copied from interface:TypedSearchAggregationFactoryPerform 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 interfaceSearchAggregationFactory- Specified by:
rangein interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
terms
TermsAggregationFieldStep<SR,PDF> terms()Description copied from interface:TypedSearchAggregationFactoryPerform 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 interfaceSearchAggregationFactory- Specified by:
termsin interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
sum
SumAggregationFieldStep<SR,PDF> sum()Description copied from interface:TypedSearchAggregationFactoryPerform the sum metric aggregation.- Specified by:
sumin interfaceSearchAggregationFactory- Specified by:
sumin interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
min
MinAggregationFieldStep<SR,PDF> min()Description copied from interface:TypedSearchAggregationFactoryPerform the min metric aggregation.- Specified by:
minin interfaceSearchAggregationFactory- Specified by:
minin interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
max
MaxAggregationFieldStep<SR,PDF> max()Description copied from interface:TypedSearchAggregationFactoryPerform the max metric aggregation.- Specified by:
maxin interfaceSearchAggregationFactory- Specified by:
maxin interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
count
CountAggregationFieldStep<SR,PDF> count()Description copied from interface:TypedSearchAggregationFactoryPerform the count metric aggregation.- Specified by:
countin interfaceSearchAggregationFactory- Specified by:
countin interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
countDistinct
CountDistinctAggregationFieldStep<SR,PDF> countDistinct()Description copied from interface:TypedSearchAggregationFactoryPerform the count distinct metric aggregation.- Specified by:
countDistinctin interfaceSearchAggregationFactory- Specified by:
countDistinctin interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
avg
AvgAggregationFieldStep<SR,PDF> avg()Description copied from interface:TypedSearchAggregationFactoryPerform the avg metric aggregation.- Specified by:
avgin interfaceSearchAggregationFactory- Specified by:
avgin interfaceTypedSearchAggregationFactory<SR>- Returns:
- the next step.
-