Interface PhrasePredicateOptionsStep<S extends PhrasePredicateOptionsStep<?>>
-
- Type Parameters:
S
- The "self" type (the actual exposed type of this step).
- All Superinterfaces:
PredicateFinalStep
,PredicateScoreStep<S>
public interface PhrasePredicateOptionsStep<S extends PhrasePredicateOptionsStep<?>> extends PredicateFinalStep, PredicateScoreStep<S>
The final step in a "phrase" predicate definition, where optional parameters can be set.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description S
analyzer(String analyzerName)
Define an analyzer to use at query time to interpret the value to match.S
skipAnalysis()
Any analyzer or normalizer defined on any field will be ignored to interpret the value to match.S
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 Detail
-
slop
S slop(int 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
S analyzer(String analyzerName)
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.
-
-