Interface PhrasePredicateOptionsStep<S extends PhrasePredicateOptionsStep<?>>
- Type Parameters:
S
- The "self" type (the actual exposed type of this step).
- All Superinterfaces:
PredicateFinalStep
,PredicateScoreStep<S>
-
Method Summary
Modifier and TypeMethodDescriptionDefine an analyzer to use at query time to interpret the value to match.Any analyzer or normalizer defined on any field will be ignored to interpret the value to match.slop
(int slop) Sets the slop, which defines how permissive the phrase predicate will be.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
-
slop
Sets the slop, which defines how permissive the phrase predicate 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. So
quick fox
with a slop of 1 can becomequick <word> fox
, where<word>
can be any word.quick fox
with a slop of 2 can becomequick <word> fox
, orquick <word1> <word2> fox
or evenfox quick
(two operations: movedfox
to the left andquick
to the right). And similarly for higher slops and for phrases with more words.- Parameters:
slop
- The slop value.- 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.
-