public class FuzzyCondition extends Condition
Condition that implements the fuzzy search query. The similarity measurement is based on the
Damerau-Levenshtein (optimal string alignment) algorithm, though you can explicitly choose classic Levenshtein by
passing false to the transpositions parameter.| Constructor and Description |
|---|
FuzzyCondition(String field,
String value)
Returns a new
FuzzyCondition. |
| Modifier and Type | Method and Description |
|---|---|
FuzzyCondition |
maxEdits(Integer maxEdits)
Returns this builder with the specified Damerau-Levenshtein max distance.
|
FuzzyCondition |
maxExpansions(Integer maxExpansions)
Returns this builder with the specified maximum number of terms to match.
|
FuzzyCondition |
prefixLength(Integer prefixLength)
Returns this builder with the length of common (non-fuzzy) prefix.
|
FuzzyCondition |
transpositions(Boolean transpositions)
Returns this builder with the specified if transpositions should be treated as a primitive edit operation.
|
boost, boostall, bigDecimalMapper, bigIntegerMapper, bitemporal, bitemporalMapper, blobMapper, bool, booleanMapper, build, classpathAnalyzer, contains, dateMapper, dateRange, dateRangeMapper, doubleMapper, field, floatMapper, fuzzy, geoBBox, geoDistance, geoDistanceSortField, geoPointMapper, index, index, inetMapper, integerMapper, longMapper, lucene, match, none, phrase, prefix, range, regexp, schema, search, snowballAnalyzer, stringMapper, textMapper, toString, uuidMapper, wildcardpublic FuzzyCondition(String field, String value)
FuzzyCondition.field - the name of the field to be matched.value - the value of the field to be matched.public FuzzyCondition maxEdits(Integer maxEdits)
maxEdits - The Damerau-Levenshtein max distance.public FuzzyCondition prefixLength(Integer prefixLength)
prefixLength - The length of common (non-fuzzy) prefix.public FuzzyCondition maxExpansions(Integer maxExpansions)
maxExpansions - The maximum number of terms to match.public FuzzyCondition transpositions(Boolean transpositions)
transpositions - If transpositions should be treated as a primitive edit operation.Copyright © 2016. All rights reserved.