Class FuzzySuggester
Implements a fuzzy AnalyzingSuggester. The similarity measurement is
based on the Damerau-Levenshtein (optimal string alignment) algorithm, though
you can explicitly choose classic Levenshtein by passing false
for the Lucene.Net.Search.Suggest.Analyzing.FuzzySuggester.transpositions parameter.
At most, this query will match terms up to
NOTE: This suggester does not boost suggestions that required no edits over suggestions that did require edits. This is a known limitation.
Note: complex query analyzers can have a significant impact on the lookup performance. It's recommended to not use analyzers that drop or inject terms like synonyms to keep the complexity of the prefix intersection low for good lookup performance. At index time, complex analyzers can safely be used.
@lucene.experimental
Inherited Members
Assembly: Lucene.Net.Suggest.dll
Syntax
public sealed class FuzzySuggester : AnalyzingSuggester
Constructors
Name | Description |
---|---|
FuzzySuggester(Analyzer) | Creates a FuzzySuggester instance initialized with default values. |
FuzzySuggester(Analyzer, Analyzer) | Creates a FuzzySuggester instance with an index & a query analyzer initialized with default values. |
FuzzySuggester(Analyzer, Analyzer, SuggesterOptions, Int32, Int32, Boolean, Int32, Boolean, Int32, Int32, Boolean) | Creates a FuzzySuggester instance. |
Fields
Name | Description |
---|---|
DEFAULT_MAX_EDITS | The default maximum number of edits for fuzzy suggestions. |
DEFAULT_MIN_FUZZY_LENGTH | The default minimum length of the key passed to Lookup before any edits are allowed. |
DEFAULT_NON_FUZZY_PREFIX | The default prefix length where edits are not allowed. |
DEFAULT_TRANSPOSITIONS | The default transposition value passed to |
DEFAULT_UNICODE_AWARE | Measure Lucene.Net.Search.Suggest.Analyzing.FuzzySuggester.maxEdits, Lucene.Net.Search.Suggest.Analyzing.FuzzySuggester.minFuzzyLength, Lucene.Net.Search.Suggest.Analyzing.FuzzySuggester.transpositions, and Lucene.Net.Search.Suggest.Analyzing.FuzzySuggester.nonFuzzyPrefix parameters in Unicode code points (actual letters) instead of bytes. |
Methods
Name | Description |
---|---|
ConvertAutomaton(Automaton) | |
GetFullPrefixPaths(IList<FSTUtil.Path<PairOutputs<Nullable<Int64>, BytesRef>.Pair>>, Automaton, FST<PairOutputs<Nullable<Int64>, BytesRef>.Pair>) |