Interface ExtendedSearchAggregationFactory<S extends ExtendedSearchAggregationFactory<?,PDF>,PDF extends SearchPredicateFactory>
- Type Parameters:
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
- All Known Subinterfaces:
ElasticsearchSearchAggregationFactory
,LuceneSearchAggregationFactory
- All Known Implementing Classes:
AbstractSearchAggregationFactory
SearchAggregationFactory
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 directtly 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:SearchAggregationFactory
Create 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:
withRoot
in interfaceSearchAggregationFactory
- 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<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 interfaceSearchAggregationFactory
- Returns:
- The next step.
-
terms
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 interfaceSearchAggregationFactory
- Returns:
- The next step.
-
sum
SumAggregationFieldStep<PDF> sum()Description copied from interface:SearchAggregationFactory
Perform the sum metric aggregation.- Specified by:
sum
in interfaceSearchAggregationFactory
- Returns:
- The next step.
-
min
MinAggregationFieldStep<PDF> min()Description copied from interface:SearchAggregationFactory
Perform the min metric aggregation.- Specified by:
min
in interfaceSearchAggregationFactory
- Returns:
- The next step.
-
max
MaxAggregationFieldStep<PDF> max()Description copied from interface:SearchAggregationFactory
Perform the max metric aggregation.- Specified by:
max
in interfaceSearchAggregationFactory
- Returns:
- The next step.
-
count
CountAggregationFieldStep<PDF> count()Description copied from interface:SearchAggregationFactory
Perform the count metric aggregation.- Specified by:
count
in interfaceSearchAggregationFactory
- Returns:
- The next step.
-
countDistinct
CountDistinctAggregationFieldStep<PDF> countDistinct()Description copied from interface:SearchAggregationFactory
Perform the count distinct metric aggregation.- Specified by:
countDistinct
in interfaceSearchAggregationFactory
- Returns:
- The next step.
-
avg
AvgAggregationFieldStep<PDF> avg()Description copied from interface:SearchAggregationFactory
Perform the avg metric aggregation.- Specified by:
avg
in interfaceSearchAggregationFactory
- Returns:
- the next step.
-