C# (CSharp) Lucene.Net.Search.Suggest.Analyzing Namespace

Classes

Name Description
BlendedInfixSuggesterTest
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 transpositions parameter.

At most, this query will match terms up to {@value org.apache.lucene.util.automaton.LevenshteinAutomata#MAXIMUM_SUPPORTED_DISTANCE} edits. Higher distances are not supported. Note that the fuzzy distance is measured in "byte space" on the bytes returned by the TokenStream's {@link TermToBytesRefAttribute}, usually UTF8. By default the analyzed bytes must be at least 3 {@link #DEFAULT_MIN_FUZZY_LENGTH} bytes before any edits are considered. Furthermore, the first 1 {@link #DEFAULT_NON_FUZZY_PREFIX} byte is not allowed to be edited. We allow up to 1 (@link #DEFAULT_MAX_EDITS} edit. If #unicodeAware parameter in the constructor is set to true, maxEdits, minFuzzyLength, transpositions and nonFuzzyPrefix are measured in Unicode code points (actual letters) instead of bytes.

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
SuggestStopFilter Like Analysis.Core.StopFilter except it will not remove the last token if that token was not followed by some token separator. For example, a query 'find the' would preserve the 'the' since it was not followed by a space or punctuation or something, and mark it KEYWORD so future stemmers won't touch it either while a query like "find the popsicle' would remove 'the' as a stopword.

Normally you'd use the ordinary Analysis.Core.StopFilter in your indexAnalyzer and then this class in your queryAnalyzer, when using one of the analyzing suggesters.

TestSuggestStopFilter