Interface QueryStringPredicateOptionsStep<S extends QueryStringPredicateOptionsStep<?>>
- Type Parameters:
S
- The "self" type (the actual exposed type of this step).
- All Superinterfaces:
CommonQueryStringPredicateOptionsStep<S>
,PredicateFinalStep
,PredicateScoreStep<S>
public interface QueryStringPredicateOptionsStep<S extends QueryStringPredicateOptionsStep<?>>
extends CommonQueryStringPredicateOptionsStep<S>
The final step in a "query string" predicate definition, where optional parameters can be set.
-
Method Summary
Modifier and TypeMethodDescriptionallowLeadingWildcard
(boolean allowLeadingWildcard) Specifies whether*
and?
are allowed as first characters of a search term.enablePositionIncrements
(boolean enablePositionIncrements) When set totrue
, resulting queries are aware of position increments.phraseSlop
(Integer phraseSlop) Sets the slop, which defines how permissive the phrase predicate (created when parsing the query string) will be.rewriteMethod
(RewriteMethod rewriteMethod) Determines how backend's query parser rewrites and scores multi-term queries.rewriteMethod
(RewriteMethod rewriteMethod, int n) Determines how backend's query parser rewrites and scores multi-term queries.Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.CommonQueryStringPredicateOptionsStep
analyzer, defaultOperator, minimumShouldMatch, minimumShouldMatch, minimumShouldMatchNumber, minimumShouldMatchPercent, skipAnalysis
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
-
allowLeadingWildcard
Specifies whether*
and?
are allowed as first characters of a search term.Default is
true
.- Parameters:
allowLeadingWildcard
- Whether wildcard characters are allowed at the start of the query string.- Returns:
this
, for method chaining.
-
enablePositionIncrements
When set totrue
, resulting queries are aware of position increments.This setting is useful when the removal of stop words leaves an unwanted “gap” between terms.
Default is
true
.- Parameters:
enablePositionIncrements
- Whether position increments are enabled.- Returns:
this
, for method chaining.
-
phraseSlop
Sets the slop, which defines how permissive the phrase predicate (created when parsing the query string) will be.If zero (the default), then the predicate will only match the exact phrase given (after analysis). Higher values are increasingly permissive, allowing unexpected words or words that switched position.
The slop represents the number of edit operations that can be applied to the phrase to match, where each edit operation moves one word by one position. See the details on the
phrase predicate slop
parameter, for more information about it.Default is
0
.- Parameters:
phraseSlop
- The slop value.- Returns:
this
, for method chaining.
-
rewriteMethod
Determines how backend's query parser rewrites and scores multi-term queries.Default is
RewriteMethod.CONSTANT_SCORE
.- Parameters:
rewriteMethod
- The rewrite method to apply.- Returns:
this
, for method chaining.- See Also:
-
rewriteMethod
Determines how backend's query parser rewrites and scores multi-term queries.Default is
RewriteMethod.CONSTANT_SCORE
.- Parameters:
rewriteMethod
- The rewrite method to apply.n
- The parameter required by a rewrite method.- Returns:
this
, for method chaining.- See Also:
-