Interface GenericBooleanPredicateClausesStep<SR,S extends C,C extends BooleanPredicateOptionsCollector<SR,?>>
- Type Parameters:
SR- Scope root type.S- The "self" type (the actual exposed type of this collector).C- The "collector" type (the type of collector passed to the consumer inwith(Consumer).
- All Superinterfaces:
BooleanPredicateOptionsCollector<SR,,C> CommonMinimumShouldMatchOptionsStep<C>,PredicateFinalStep,PredicateScoreStep<S>
- All Known Subinterfaces:
BooleanPredicateClausesStep<SR,S>
public interface GenericBooleanPredicateClausesStep<SR,S extends C,C extends BooleanPredicateOptionsCollector<SR,?>>
extends BooleanPredicateOptionsCollector<SR,C>, PredicateScoreStep<S>, PredicateFinalStep
A generic superinterface for Predicate DSL steps that involve collecting clauses and options of a boolean predicate.
This interface mostly a technical detail to handle generics in the predicate DSL;
refer to BooleanPredicateOptionsCollector, PredicateScoreStep or PredicateFinalStep
for meaningful documentation.
-
Method Summary
Modifier and TypeMethodDescriptionfilter(Function<? super TypedSearchPredicateFactory<SR>, ? extends PredicateFinalStep> clauseContributor) Add a "filter" clause to be defined by the given function.default Sfilter(PredicateFinalStep dslFinalStep) Add a "filter" clause based on an almost-builtSearchPredicate.filter(SearchPredicate searchPredicate) Add a "filter" clause based on a previously-builtSearchPredicate.minimumShouldMatch(Consumer<? super MinimumShouldMatchConditionStep<?>> constraintContributor) Start defining the minimum number of "should" constraints that have to match in order for the boolean predicate to match.default SminimumShouldMatchNumber(int matchingClausesNumber) Add a default "minimumShouldMatch" constraint.default SminimumShouldMatchPercent(int matchingClausesPercent) Add a default "minimumShouldMatch" constraint.must(Function<? super TypedSearchPredicateFactory<SR>, ? extends PredicateFinalStep> clauseContributor) Add a "must" clause to be defined by the given function.default Smust(PredicateFinalStep dslFinalStep) Add a "must" clause based on an almost-builtSearchPredicate.must(SearchPredicate searchPredicate) Add a "must" clause based on a previously-builtSearchPredicate.mustNot(Function<? super TypedSearchPredicateFactory<SR>, ? extends PredicateFinalStep> clauseContributor) Add a "must not" clause to be defined by the given function.default SmustNot(PredicateFinalStep dslFinalStep) Add a "must not" clause based on an almost-builtSearchPredicate.mustNot(SearchPredicate searchPredicate) Add a "must not" clause based on a previously-builtSearchPredicate.should(Function<? super TypedSearchPredicateFactory<SR>, ? extends PredicateFinalStep> clauseContributor) Add a "should" clause to be defined by the given function.default Sshould(PredicateFinalStep dslFinalStep) Add a "should" clause based on an almost-builtSearchPredicate.should(SearchPredicate searchPredicate) Add a "should" clause based on a previously-builtSearchPredicate.Delegates setting clauses and options to a given consumer.Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.BooleanPredicateOptionsCollector
hasClauseMethods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep
toPredicateMethods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateScoreStep
boost, constantScore
-
Method Details
-
with
Description copied from interface:BooleanPredicateOptionsCollectorDelegates setting clauses and options to a given consumer.Best used with lambda expressions.
- Specified by:
within interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
contributor- A consumer that will add clauses and options to the collector that it consumes. Should generally be a lambda expression.- Returns:
this, for method chaining.
-
must
Description copied from interface:BooleanPredicateOptionsCollectorAdd a "must" clause based on a previously-builtSearchPredicate.- Specified by:
mustin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
searchPredicate- The predicate that must match.- Returns:
this, for method chaining.
-
mustNot
Description copied from interface:BooleanPredicateOptionsCollectorAdd a "must not" clause based on a previously-builtSearchPredicate.- Specified by:
mustNotin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
searchPredicate- The predicate that must not match.- Returns:
this, for method chaining.
-
should
Description copied from interface:BooleanPredicateOptionsCollectorAdd a "should" clause based on a previously-builtSearchPredicate.- Specified by:
shouldin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
searchPredicate- The predicate that should match.- Returns:
this, for method chaining.
-
filter
Description copied from interface:BooleanPredicateOptionsCollectorAdd a "filter" clause based on a previously-builtSearchPredicate.- Specified by:
filterin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
searchPredicate- The predicate that must match.- Returns:
this, for method chaining.
-
must
Description copied from interface:BooleanPredicateOptionsCollectorAdd a "must" clause based on an almost-builtSearchPredicate.- Specified by:
mustin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
dslFinalStep- A final step in the predicate DSL allowing the retrieval of aSearchPredicate.- Returns:
this, for method chaining.
-
mustNot
Description copied from interface:BooleanPredicateOptionsCollectorAdd a "must not" clause based on an almost-builtSearchPredicate.- Specified by:
mustNotin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
dslFinalStep- A final step in the predicate DSL allowing the retrieval of aSearchPredicate.- Returns:
this, for method chaining.
-
should
Description copied from interface:BooleanPredicateOptionsCollectorAdd a "should" clause based on an almost-builtSearchPredicate.- Specified by:
shouldin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
dslFinalStep- A final step in the predicate DSL allowing the retrieval of aSearchPredicate.- Returns:
this, for method chaining.
-
filter
Description copied from interface:BooleanPredicateOptionsCollectorAdd a "filter" clause based on an almost-builtSearchPredicate.- Specified by:
filterin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - Parameters:
dslFinalStep- A final step in the predicate DSL allowing the retrieval of aSearchPredicate.- Returns:
this, for method chaining.
-
must
S must(Function<? super TypedSearchPredicateFactory<SR>, ? extends PredicateFinalStep> clauseContributor) Description copied from interface:BooleanPredicateOptionsCollectorAdd a "must" clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
mustin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - 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.
-
mustNot
S mustNot(Function<? super TypedSearchPredicateFactory<SR>, ? extends PredicateFinalStep> clauseContributor) Description copied from interface:BooleanPredicateOptionsCollectorAdd a "must not" clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
mustNotin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - 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.
-
should
S should(Function<? super TypedSearchPredicateFactory<SR>, ? extends PredicateFinalStep> clauseContributor) Description copied from interface:BooleanPredicateOptionsCollectorAdd a "should" clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
shouldin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - 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
S filter(Function<? super TypedSearchPredicateFactory<SR>, ? extends PredicateFinalStep> clauseContributor) Description copied from interface:BooleanPredicateOptionsCollectorAdd a "filter" clause to be defined by the given function.Best used with lambda expressions.
- Specified by:
filterin interfaceBooleanPredicateOptionsCollector<SR,S extends C> - 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.
-
minimumShouldMatchNumber
Description copied from interface:CommonMinimumShouldMatchOptionsStepAdd a default "minimumShouldMatch" constraint.- Specified by:
minimumShouldMatchNumberin interfaceCommonMinimumShouldMatchOptionsStep<SR>- Parameters:
matchingClausesNumber- A definition of the number of "should" clauses that have to match. If positive, it is the number of clauses that have to match. See Definition of the minimum for details and possible values, in particular negative values.- Returns:
this, for method chaining.
-
minimumShouldMatchPercent
Description copied from interface:CommonMinimumShouldMatchOptionsStepAdd a default "minimumShouldMatch" constraint.- Specified by:
minimumShouldMatchPercentin interfaceCommonMinimumShouldMatchOptionsStep<SR>- Parameters:
matchingClausesPercent- A definition of the number of "should" clauses that have to match, as a percentage. If positive, it is the percentage of the total number of "should" clauses that have to match. See Definition of the minimum for details and possible values, in particular negative values.- Returns:
this, for method chaining.
-
minimumShouldMatch
MinimumShouldMatchConditionStep<S> minimumShouldMatch()- Specified by:
minimumShouldMatchin interfaceCommonMinimumShouldMatchOptionsStep<SR>
-
minimumShouldMatch
Description copied from interface:CommonMinimumShouldMatchOptionsStepStart defining the minimum number of "should" constraints that have to match in order for the boolean predicate to match.- Specified by:
minimumShouldMatchin interfaceCommonMinimumShouldMatchOptionsStep<SR>- Returns:
- A
MinimumShouldMatchConditionStepwhere constraints can be defined.
-