Interface CommonQueryStringPredicateOptionsStep<S extends CommonQueryStringPredicateOptionsStep<?>>
- Type Parameters:
S
- The "self" type (the actual exposed type of this step).
- All Superinterfaces:
PredicateFinalStep
,PredicateScoreStep<S>
- All Known Subinterfaces:
QueryStringPredicateOptionsStep<S>
,SimpleQueryStringPredicateOptionsStep<S>
public interface CommonQueryStringPredicateOptionsStep<S extends CommonQueryStringPredicateOptionsStep<?>>
extends PredicateFinalStep, PredicateScoreStep<S>
The final step in a query string predicate definition, where optional parameters can be set.
-
Method Summary
Modifier and TypeMethodDescriptionDefine an analyzer to use at query time to interpret the value to match.defaultOperator
(BooleanOperator operator) Define the default operator.MinimumShouldMatchConditionStep<? extends 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.Any analyzer or normalizer defined on any field will be ignored to interpret the value to match.Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep
toPredicate
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateScoreStep
boost, constantScore
-
Method Details
-
defaultOperator
Define the default operator.By default, unless the query string contains explicit operators, documents will match if any term mentioned in the query string is present in the document (
OR
operator). This can be used to change the default behavior toAND
, making document match if all terms mentioned in the query string are present in the document.- Parameters:
operator
- The default operator (OR
orAND
).- Returns:
this
, for method chaining.
-
analyzer
Define an analyzer to use at query time to interpret the value to match.If this method is not called, the analyzer defined on the field will be used.
- Parameters:
analyzerName
- The name of the analyzer to use in the query for this predicate.- Returns:
this
, for method chaining.
-
skipAnalysis
S skipAnalysis()Any analyzer or normalizer defined on any field will be ignored to interpret the value to match.- Returns:
this
, for method chaining.
-
minimumShouldMatchNumber
Add a default "minimumShouldMatch" constraint.- 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
Add a default "minimumShouldMatch" constraint.- 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<? extends S> minimumShouldMatch() -
minimumShouldMatch
Start defining the minimum number of "should" constraints that have to match in order for the boolean predicate to match.- Returns:
- A
MinimumShouldMatchConditionStep
where constraints can be defined.
-