Interface TermsAggregationValueStep<SR,S extends TermsAggregationOptionsStep<SR,?,PDF,F,A>,PDF extends TypedSearchPredicateFactory<SR>,F,A>

Type Parameters:
SR - Scope root type.
PDF - The type of factory used to create predicates in AggregationFilterStep.filter(Function).
F - The type of the targeted field.
All Superinterfaces:
AggregationFilterStep<SR,S,PDF>, AggregationFinalStep<A>, TermsAggregationOptionsStep<SR,S,PDF,F,A>

@Incubating public interface TermsAggregationValueStep<SR,S extends TermsAggregationOptionsStep<SR,?,PDF,F,A>,PDF extends TypedSearchPredicateFactory<SR>,F,A> extends TermsAggregationOptionsStep<SR,S,PDF,F,A>
The step in a "terms" aggregation definition where the aggregation value for the term can be set.
  • Method Details

    • value

      @Incubating <T> TermsAggregationOptionsStep<SR,?,PDF,F,Map<F,T>> value(SearchAggregation<T> aggregation)
      Specify which aggregation to apply to the documents with same terms.

      This allows to "group" the documents by "terms" and then apply one of the aggregations from SearchAggregationFactory to the documents in that group.

      Type Parameters:
      T - The type of the aggregated results for a term.
      Parameters:
      aggregation - The aggregation to apply to the documents for each term.
      Returns:
      The next step in terms aggregation definition.
    • value

      @Incubating default <T> TermsAggregationOptionsStep<SR,?,PDF,F,Map<F,T>> value(AggregationFinalStep<T> aggregation)
      Specify which aggregation to apply to the documents with same terms.

      This allows to "group" the documents by "terms" and then apply one of the aggregations from SearchAggregationFactory to the documents in that group.

      Type Parameters:
      T - The type of the aggregated results for a term.
      Parameters:
      aggregation - The aggregation to apply to the documents for each term.
      Returns:
      The next step in terms aggregation definition.