Class SearchAggregationDslContext<SR,SC extends SearchAggregationIndexScope<?>,PDF extends SearchPredicateFactory<SR>>

java.lang.Object
org.hibernate.search.engine.search.aggregation.dsl.spi.SearchAggregationDslContext<SR,SC,PDF>
Type Parameters:
SR - Scope root type. *
SC - The type of the backend-specific search scope.
PDF - The type of factory used to create predicates in SortFilterStep.filter(Function).

public class SearchAggregationDslContext<SR,SC extends SearchAggregationIndexScope<?>,PDF extends SearchPredicateFactory<SR>> extends Object
Represents the current context in the search DSL, including in particular the search scope and the aggregation builder factory.
  • Method Details

    • root

      public static <SR, SC extends SearchAggregationIndexScope<?>, PDF extends SearchPredicateFactory<SR>> SearchAggregationDslContext<SR,SC,PDF> root(SC scope, PDF predicateFactory)
    • scope

      public SC scope()
      Returns:
      The search scope.
    • rescope

      public SearchAggregationDslContext<SR,SC,PDF> rescope(SC newScope, PDF newPredicateFactory)
      Parameters:
      newScope - The new scope for the new DSL context.
      newPredicateFactory - The new predicate factory for the new DSL context.
      Returns:
      A copy of this DSL context with its scope and predicate factory replaced with the given ones.
    • predicateFactory

      public PDF predicateFactory()
      Returns:
      The predicate factory. Will always return the exact same instance.