Interface AggregationFilterStep<S,PDF extends SearchPredicateFactory>

Type Parameters:
S - The "self" type (the actual exposed type of this step)
PDF - The type of factory used to create predicates in filter(Function).
All Known Subinterfaces:
RangeAggregationOptionsStep<S,PDF,F,A>, RangeAggregationRangeMoreStep<S,N,PDF,F>, TermsAggregationOptionsStep<S,PDF,F,A>

public interface AggregationFilterStep<S,PDF extends SearchPredicateFactory>
The step in an aggregation definition where a filter can be set to select nested objects from which values will be extracted for this aggregation.
  • Method Summary

    Modifier and Type
    Method
    Description
    filter(Function<? super PDF,? extends PredicateFinalStep> clauseContributor)
    Filter nested objects from which values will be extracted for this aggregation.
    default S
    filter(PredicateFinalStep dslFinalStep)
    Filter nested objects from which values will be extracted for this aggregation.
    filter(SearchPredicate searchPredicate)
    Filter nested objects from which values will be extracted for this aggregation.
  • Method Details

    • filter

      S filter(SearchPredicate searchPredicate)
      Filter nested objects from which values will be extracted for this aggregation.

      The filter is based on a previously-built SearchPredicate.

      Parameters:
      searchPredicate - The predicate that must match.
      Returns:
      this, for method chaining.
    • filter

      S filter(Function<? super PDF,? extends PredicateFinalStep> clauseContributor)
      Filter nested objects from which values will be extracted for this aggregation.

      The filter is defined by the given function.

      Best used with lambda expressions.

      Parameters:
      clauseContributor - A function that will use the factory passed in parameter to create a predicate, returning the final step in the predicate DSL. Should generally be a lambda expression.
      Returns:
      this, for method chaining.
    • filter

      default S filter(PredicateFinalStep dslFinalStep)
      Filter nested objects from which values will be extracted for this aggregation.

      The filter is based on an almost-built SearchPredicate.

      Parameters:
      dslFinalStep - A final step in the predicate DSL allowing the retrieval of a SearchPredicate.
      Returns:
      this, for method chaining.