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.Deprecated, for removal: This API element is subject to removal in a future version.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
composite, composite, composite, 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.Sums up the field values.
- 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.Provides the minimum value among the field values.
- 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.Provides the maximum value among the field values.
- Specified by:
maxin interfaceSearchAggregationFactory- Specified by:
maxin interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
count
Description copied from interface:TypedSearchAggregationFactoryPerform the count metric aggregation.The following steps allow defining the kind of the count aggregation:
count documentsorcount values.- Specified by:
countin interfaceSearchAggregationFactory- Specified by:
countin interfaceTypedSearchAggregationFactory<SR>- Returns:
- The next step.
-
countDistinct
@Deprecated(since="8.1", forRemoval=true) CountDistinctValuesAggregationFieldStep<SR,PDF> countDistinct()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:TypedSearchAggregationFactoryPerform the count distinct values metric aggregation.Counts the number of unique field values.
- 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.Calculates the average value of a given numeric or temporal field among the matched documents.
- Specified by:
avgin interfaceSearchAggregationFactory- Specified by:
avgin interfaceTypedSearchAggregationFactory<SR>- Returns:
- the next step.
-