public interface MatchPredicateTerminalContext extends SearchPredicateTerminalContext, SearchPredicateScoreContext<MatchPredicateTerminalContext>
Allows to set options or to retrieve the predicate.
| Modifier and Type | Method and Description |
|---|---|
default MatchPredicateTerminalContext |
fuzzy()
Enable fuzziness for this match predicate; only works for text fields.
|
default MatchPredicateTerminalContext |
fuzzy(int maxEditDistance)
Enable fuzziness for this match predicate; only works for text fields.
|
MatchPredicateTerminalContext |
fuzzy(int maxEditDistance,
int exactPrefixLength)
Enable fuzziness for this match predicate; only works for text fields.
|
toPredicatewithConstantScoreboostedTodefault MatchPredicateTerminalContext fuzzy()
Fuzziness allows to match documents that do not contain the value to match, but a close value, for example with one letter that differs.
this, for method chaining.fuzzy(int, int)default MatchPredicateTerminalContext fuzzy(int maxEditDistance)
Fuzziness allows to match documents that do not contain the value to match, but a close value, for example with one letter that differs.
maxEditDistance - The maximum value of the edit distance, which defines how permissive the fuzzy predicate will be.this, for method chaining.fuzzy(int, int)MatchPredicateTerminalContext fuzzy(int maxEditDistance, int exactPrefixLength)
Fuzziness allows to match documents that do not contain the value to match, but a close value, for example with one letter that differs.
maxEditDistance - The maximum value of the edit distance, which defines how permissive the fuzzy predicate will be.
Roughly speaking, the edit distance is the number of changes between two terms: switching characters, removing them, ...
If zero, then fuzziness is completely disabled.
The other accepted values, 1 and 2, are increasingly fuzzy.
exactPrefixLength - Length of the prefix that has to match exactly, i.e. for which fuzziness will not be allowed.
A non-zero value is recommended if the index contains a large amount of distinct terms.
this, for method chaining.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.