S - The "self" type (the actual exposed type of this step).public interface BooleanPredicateClausesStep<S extends BooleanPredicateClausesStep<?>> extends PredicateScoreStep<S>, PredicateFinalStep
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.
| Modifier and Type | Method and Description |
|---|---|
S |
filter(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Add a "filter" clause to be defined by the given function.
|
default S |
filter(PredicateFinalStep dslFinalStep)
Add a "filter" clause based on an almost-built
SearchPredicate. |
S |
filter(SearchPredicate searchPredicate)
Add a "filter" clause based on a previously-built
SearchPredicate. |
MinimumShouldMatchConditionStep<S> |
minimumShouldMatch()
Start defining the minimum number of "should" constraints that have to match
in order for the boolean predicate to match.
|
S |
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 S |
minimumShouldMatchNumber(int matchingClausesNumber)
Add a default "minimumShouldMatch" constraint.
|
default S |
minimumShouldMatchPercent(int matchingClausesPercent)
Add a default "minimumShouldMatch" constraint.
|
S |
must(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Add a "must" clause to be defined by the given function.
|
default S |
must(PredicateFinalStep dslFinalStep)
Add a "must" clause based on an almost-built
SearchPredicate. |
S |
must(SearchPredicate searchPredicate)
Add a "must" clause based on a previously-built
SearchPredicate. |
S |
mustNot(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Add a "must not" clause to be defined by the given function.
|
default S |
mustNot(PredicateFinalStep dslFinalStep)
Add a "must not" clause based on an almost-built
SearchPredicate. |
S |
mustNot(SearchPredicate searchPredicate)
Add a "must not" clause based on a previously-built
SearchPredicate. |
S |
should(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Add a "should" clause to be defined by the given function.
|
default S |
should(PredicateFinalStep dslFinalStep)
Add a "should" clause based on an almost-built
SearchPredicate. |
S |
should(SearchPredicate searchPredicate)
Add a "should" clause based on a previously-built
SearchPredicate. |
constantScoreboosttoPredicateS must(SearchPredicate searchPredicate)
SearchPredicate.searchPredicate - The predicate that must match.this, for method chaining.S mustNot(SearchPredicate searchPredicate)
SearchPredicate.searchPredicate - The predicate that must not match.this, for method chaining.S should(SearchPredicate searchPredicate)
SearchPredicate.searchPredicate - The predicate that should match.this, for method chaining.S filter(SearchPredicate searchPredicate)
SearchPredicate.searchPredicate - The predicate that must match.this, for method chaining.default S must(PredicateFinalStep dslFinalStep)
SearchPredicate.dslFinalStep - A final step in the predicate DSL allowing the retrieval of a SearchPredicate.this, for method chaining.default S mustNot(PredicateFinalStep dslFinalStep)
SearchPredicate.dslFinalStep - A final step in the predicate DSL allowing the retrieval of a SearchPredicate.this, for method chaining.default S should(PredicateFinalStep dslFinalStep)
SearchPredicate.dslFinalStep - A final step in the predicate DSL allowing the retrieval of a SearchPredicate.this, for method chaining.default S filter(PredicateFinalStep dslFinalStep)
SearchPredicate.dslFinalStep - A final step in the predicate DSL allowing the retrieval of a SearchPredicate.this, for method chaining.S must(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Best used with lambda expressions.
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.this, for method chaining.S mustNot(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Best used with lambda expressions.
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.this, for method chaining.S should(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Best used with lambda expressions.
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.this, for method chaining.S filter(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Best used with lambda expressions.
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.this, for method chaining.default S 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 S 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.MinimumShouldMatchConditionStep<S> minimumShouldMatch()
MinimumShouldMatchConditionStep where constraints can be defined.S minimumShouldMatch(Consumer<? super MinimumShouldMatchConditionStep<?>> constraintContributor)
constraintContributor - A consumer that will add constraints to the DSL step passed in parameter.
Should generally be a lambda expression.this, for method chaining.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.