Class FuzzySuggester
Implements a fuzzy Analyzingfalse
for the Lucene.
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.
Inherited Members
Namespace: Lucene.Net.Search.Suggest.Analyzing
Assembly: Lucene.Net.Suggest.dll
Syntax
public sealed class FuzzySuggester : AnalyzingSuggester
Constructors
| Improve this Doc View SourceFuzzySuggester(Analyzer)
Creates a Fuzzy
Declaration
public FuzzySuggester(Analyzer analyzer)
Parameters
Type | Name | Description |
---|---|---|
Analyzer | analyzer | The |
FuzzySuggester(Analyzer, Analyzer)
Creates a Fuzzy
Declaration
public FuzzySuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer)
Parameters
Type | Name | Description |
---|---|---|
Analyzer | indexAnalyzer | |
Analyzer | queryAnalyzer |
FuzzySuggester(Analyzer, Analyzer, SuggesterOptions, Int32, Int32, Boolean, Int32, Boolean, Int32, Int32, Boolean)
Creates a Fuzzy
Declaration
public FuzzySuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer, SuggesterOptions options, int maxSurfaceFormsPerAnalyzedForm, int maxGraphExpansions, bool preservePositionIncrements, int maxEdits, bool transpositions, int nonFuzzyPrefix, int minFuzzyLength, bool unicodeAware)
Parameters
Type | Name | Description |
---|---|---|
Analyzer | indexAnalyzer | The |
Analyzer | queryAnalyzer | The |
Suggester |
options | see EXACT_FIRST, PRESERVE_SEP |
System. |
maxSurfaceFormsPerAnalyzedForm | Maximum number of surface forms to keep for a single analyzed form. When there are too many surface forms we discard the lowest weighted ones. |
System. |
maxGraphExpansions | Maximum number of graph paths to expand from the analyzed form. Set this to -1 for no limit. |
System. |
preservePositionIncrements | Whether position holes should appear in the automaton |
System. |
maxEdits | must be >= 0 and <= |
System. |
transpositions |
|
System. |
nonFuzzyPrefix | length of common (non-fuzzy) prefix (see default DEFAULT_NON_FUZZY_PREFIX |
System. |
minFuzzyLength | minimum length of lookup key before any edits are allowed (see default DEFAULT_MIN_FUZZY_LENGTH) |
System. |
unicodeAware | operate Unicode code points instead of bytes. |
Fields
| Improve this Doc View SourceDEFAULT_MAX_EDITS
The default maximum number of edits for fuzzy suggestions.
Declaration
public const int DEFAULT_MAX_EDITS = null
Field Value
Type | Description |
---|---|
System. |
DEFAULT_MIN_FUZZY_LENGTH
The default minimum length of the key passed to Lookup before any edits are allowed.
Declaration
public const int DEFAULT_MIN_FUZZY_LENGTH = null
Field Value
Type | Description |
---|---|
System. |
DEFAULT_NON_FUZZY_PREFIX
The default prefix length where edits are not allowed.
Declaration
public const int DEFAULT_NON_FUZZY_PREFIX = null
Field Value
Type | Description |
---|---|
System. |
DEFAULT_TRANSPOSITIONS
The default transposition value passed to
Declaration
public const bool DEFAULT_TRANSPOSITIONS = null
Field Value
Type | Description |
---|---|
System. |
DEFAULT_UNICODE_AWARE
Measure Lucene.
Declaration
public const bool DEFAULT_UNICODE_AWARE = null
Field Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceConvertAutomaton(Automaton)
Declaration
protected override Automaton ConvertAutomaton(Automaton a)
Parameters
Type | Name | Description |
---|---|---|
Automaton | a |
Returns
Type | Description |
---|---|
Automaton |
Overrides
| Improve this Doc View SourceGetFullPrefixPaths(IList<FSTUtil.Path<PairOutputs<Nullable<Int64>, BytesRef>.Pair>>, Automaton, FST<PairOutputs<Nullable<Int64>, BytesRef>.Pair>)
Declaration
protected override IList<FSTUtil.Path<PairOutputs<long?, BytesRef>.Pair>> GetFullPrefixPaths(IList<FSTUtil.Path<PairOutputs<long?, BytesRef>.Pair>> prefixPaths, Automaton lookupAutomaton, FST<PairOutputs<long?, BytesRef>.Pair> fst)
Parameters
Type | Name | Description |
---|---|---|
IList<FSTUtil. |
prefixPaths | |
Automaton | lookupAutomaton | |
FST<Pair |
fst |
Returns
Type | Description |
---|---|
IList<FSTUtil. |