S - The "self" type (the actual exposed type of this step).public interface PhrasePredicateOptionsStep<S extends PhrasePredicateOptionsStep<?>> extends PredicateFinalStep, PredicateScoreStep<S>
| Modifier and Type | Method and 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.
|
toPredicateconstantScoreboostS slop(int slop)
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 become quick * fox, where <word> can be any word.
quick fox with a slop of 2 can become quick <word> fox, or quick <word1> <word2> fox
or even fox quick (two operations: moved fox to the left and quick to the right).
And similarly for higher slops and for phrases with more words.
slop - The slop valuethis, for method chaining.S analyzer(String analyzerName)
If this method is not called, the analyzer defined on the field will be used.
analyzerName - The name of the analyzer to use in the query for this predicate.this, for method chaining.S skipAnalysis()
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.