public interface BooleanJunctionPredicateContext extends SearchPredicateNoFieldContext<BooleanJunctionPredicateContext>, SearchPredicateTerminalContext
Different types of clauses have different effects, see below.
"must" clauses are required to match: if they don't match, then the boolean predicate will not match.
Matching "must" clauses are taken into account in score computation.
"must not" clauses are required to not match: if they don't match, then the boolean predicate will not match.
"must not" clauses are ignored from score computation.
"must not" clauses are
"filter" clauses are required to match: if they don't match, then the boolean predicate will not match.
"filter" clauses are ignored from score computation, and so are any clauses of boolean predicates contained in the filter clause (even "match" or "should" clauses).
"should" clauses may optionally match, and are required to match depending on the context.
Matching "should" clauses are taken into account in score computation.
boostedTo
toPredicate
BooleanJunctionPredicateContext must(SearchPredicate searchPredicate)
SearchPredicate
.searchPredicate
- The predicate that must match.this
, for method chaining.BooleanJunctionPredicateContext mustNot(SearchPredicate searchPredicate)
SearchPredicate
.searchPredicate
- The predicate that must not match.this
, for method chaining.BooleanJunctionPredicateContext should(SearchPredicate searchPredicate)
SearchPredicate
.searchPredicate
- The predicate that should match.this
, for method chaining.BooleanJunctionPredicateContext filter(SearchPredicate searchPredicate)
SearchPredicate
.searchPredicate
- The predicate that must match.this
, for method chaining.default BooleanJunctionPredicateContext must(SearchPredicateTerminalContext terminalContext)
SearchPredicate
.terminalContext
- The terminal context allowing to retrieve a SearchPredicate
.this
, for method chaining.default BooleanJunctionPredicateContext mustNot(SearchPredicateTerminalContext terminalContext)
SearchPredicate
.terminalContext
- The terminal context allowing to retrieve a SearchPredicate
.this
, for method chaining.default BooleanJunctionPredicateContext should(SearchPredicateTerminalContext terminalContext)
SearchPredicate
.terminalContext
- The terminal context allowing to retrieve a SearchPredicate
.this
, for method chaining.default BooleanJunctionPredicateContext filter(SearchPredicateTerminalContext terminalContext)
SearchPredicate
.terminalContext
- The terminal context allowing to retrieve a SearchPredicate
.this
, for method chaining.BooleanJunctionPredicateContext must(Function<? super SearchPredicateFactoryContext,? extends SearchPredicateTerminalContext> clauseContributor)
Best used with lambda expressions.
clauseContributor
- A function that will use the DSL context passed in parameter to create a predicate,
returning the resulting terminal context.
Should generally be a lambda expression.this
, for method chaining.BooleanJunctionPredicateContext mustNot(Function<? super SearchPredicateFactoryContext,? extends SearchPredicateTerminalContext> clauseContributor)
Best used with lambda expressions.
clauseContributor
- A function that will use the DSL context passed in parameter to create a predicate,
returning the resulting terminal context.
Should generally be a lambda expression.this
, for method chaining.BooleanJunctionPredicateContext should(Function<? super SearchPredicateFactoryContext,? extends SearchPredicateTerminalContext> clauseContributor)
Best used with lambda expressions.
clauseContributor
- A function that will use the DSL context passed in parameter to create a predicate,
returning the resulting terminal context.
Should generally be a lambda expression.this
, for method chaining.BooleanJunctionPredicateContext filter(Function<? super SearchPredicateFactoryContext,? extends SearchPredicateTerminalContext> clauseContributor)
Best used with lambda expressions.
clauseContributor
- A function that will use the DSL context passed in parameter to create a predicate,
returning the resulting terminal context.
Should generally be a lambda expression.this
, for method chaining.default BooleanJunctionPredicateContext minimumShouldMatchNumber(int matchingClausesNumber)
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.this
, for method chaining.default BooleanJunctionPredicateContext minimumShouldMatchPercent(int matchingClausesPercent)
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.this
, for method chaining.MinimumShouldMatchContext<? extends BooleanJunctionPredicateContext> minimumShouldMatch()
MinimumShouldMatchContext
allowing to define constraints.BooleanJunctionPredicateContext minimumShouldMatch(Consumer<? super MinimumShouldMatchContext<?>> constraintContributor)
constraintContributor
- A consumer that will add constraints to the context passed in parameter.
Should generally be a lambda expression.this
, for method chaining.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.