Interface CountAggregationKindStep<SR,PDF extends TypedSearchPredicateFactory<SR>>
- Type Parameters:
SR- Scope root type.PDF- The type of factory used to create predicates inAggregationFilterStep.filter(Function).
@Incubating
public interface CountAggregationKindStep<SR,PDF extends TypedSearchPredicateFactory<SR>>
The initial step in a "count" aggregation definition, where the kind of the aggregation can be picked.
-
Method Summary
Modifier and TypeMethodDescriptionCount documents that match the query.Count the number of non-empty values for the given field.default CountValuesAggregationOptionsStep<SR, ?, PDF> field(CountAggregationFieldReference<SR> fieldReference) Count the number of non-empty values for the given field.
-
Method Details
-
documents
Count documents that match the query.This aggregation may be useful for building
SearchAggregationFactory.range()orSearchAggregationFactory.terms()aggregations.- Returns:
- The next step.
-
field
Count the number of non-empty values for the given field.For a multi-valued field, the resulting count may be greater than the number of matched documents.
- Parameters:
fieldPath- The path to the index field to aggregate.- Returns:
- The next step.
-
field
@Incubating default CountValuesAggregationOptionsStep<SR,?, fieldPDF> (CountAggregationFieldReference<SR> fieldReference) Count the number of non-empty values for the given field.For a multi-valued field, the resulting count may be greater than the number of matched documents.
- Parameters:
fieldReference- The field reference representing a definition of the index field to aggregate.- Returns:
- The next step.
-