Class FuzzyOptions.Builder
java.lang.Object
org.elasticsearch.search.suggest.completion.FuzzyOptions.Builder
- Enclosing class:
- FuzzyOptions
Options for fuzzy queries
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
setFuzziness(int editDistance)
Sets the level of fuzziness used to create suggestions using aFuzziness
instance.setFuzziness(Fuzziness fuzziness)
Sets the level of fuzziness used to create suggestions using aFuzziness
instance.setFuzzyMinLength(int fuzzyMinLength)
Sets the minimum length of input string before fuzzy suggestions are returned, defaulting to 3.setFuzzyPrefixLength(int fuzzyPrefixLength)
Sets the minimum length of the input, which is not checked for fuzzy alternatives, defaults to 1setMaxDeterminizedStates(int maxDeterminizedStates)
Sets the maximum automaton states allowed for the fuzzy expansionsetTranspositions(boolean transpositions)
Sets if transpositions (swapping one character for another) counts as one character change or two.setUnicodeAware(boolean unicodeAware)
Set to true if all measurements (like edit distance, transpositions and lengths) are in unicode code points (actual letters) instead of bytes.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setFuzziness
Sets the level of fuzziness used to create suggestions using aFuzziness
instance. The default value isFuzziness.ONE
which allows for an "edit distance" of one. -
setFuzziness
Sets the level of fuzziness used to create suggestions using aFuzziness
instance. The default value isFuzziness.ONE
which allows for an "edit distance" of one. -
setTranspositions
Sets if transpositions (swapping one character for another) counts as one character change or two. Defaults to true, meaning it uses the fuzzier option of counting transpositions as a single change. -
setFuzzyMinLength
Sets the minimum length of input string before fuzzy suggestions are returned, defaulting to 3. -
setFuzzyPrefixLength
Sets the minimum length of the input, which is not checked for fuzzy alternatives, defaults to 1 -
setMaxDeterminizedStates
Sets the maximum automaton states allowed for the fuzzy expansion -
setUnicodeAware
Set to true if all measurements (like edit distance, transpositions and lengths) are in unicode code points (actual letters) instead of bytes. Default is false. -
build
-