Interface TermsAggregationFieldStep<SR,PDF extends TypedSearchPredicateFactory<SR>>

Type Parameters:
SR - Scope root type.
PDF - The type of factory used to create predicates in AggregationFilterStep.filter(Function).

public interface TermsAggregationFieldStep<SR,PDF extends TypedSearchPredicateFactory<SR>>
The initial step in a "terms" aggregation definition, where the target field can be set.
  • Method Details

    • field

      default <F> TermsAggregationOptionsStep<SR,?,PDF,F,Map<F,Long>> field(String fieldPath, Class<F> type)
      Target the given field in the terms aggregation.
      Type Parameters:
      F - The type of field values.
      Parameters:
      fieldPath - The path to the index field to aggregate.
      type - The type of field values.
      Returns:
      The next step.
    • field

      @Deprecated(since="7.2") default <F> TermsAggregationOptionsStep<SR,?,PDF,F,Map<F,Long>> field(String fieldPath, Class<F> type, ValueConvert convert)
      Deprecated.
      Target the given field in the terms aggregation.
      Type Parameters:
      F - The type of field values.
      Parameters:
      fieldPath - The path to the index field to aggregate.
      type - The type of field values.
      convert - Controls how the term values fetched from the backend should be converted. See ValueConvert.
      Returns:
      The next step.
    • field

      <F> TermsAggregationOptionsStep<SR,?,PDF,F,Map<F,Long>> field(String fieldPath, Class<F> type, ValueModel valueModel)
      Target the given field in the terms aggregation.
      Type Parameters:
      F - The type of field values.
      Parameters:
      fieldPath - The path to the index field to aggregate.
      type - The type of field values.
      valueModel - The model of terms values, used to determine how term values fetched from the backend should be converted. See ValueModel.
      Returns:
      The next step.
    • field

      default <F> TermsAggregationOptionsStep<SR,?,PDF,F,Map<F,Long>> field(TermsAggregationFieldReference<? super SR,F> fieldReference)
      Target the given field in the terms aggregation.
      Type Parameters:
      F - The type of field values.
      Parameters:
      fieldReference - The field reference representing a definition of the index field to aggregate.
      Returns:
      The next step.