
DidYouMeanSuggester
- Namespace
- Rowles.LeanCorpus.Search.Suggestions
- Assembly
- Rowles.LeanCorpus.dll
"Did you mean?" spelling correction. Delegates to SpellIndex which uses a pre-built character-trigram inverted index for fast candidate filtering, then scores by docFreq / (1 + editDistance). The SpellIndex is cached per searcher/field pair and released when the IndexSearcher is collected.
public static class DidYouMeanSuggester
- Inheritance
-
DidYouMeanSuggester
Suggest(IndexSearcher, string, string, int, int)
Suggests corrections for queryTerm in the given field.
The underlying SpellIndex is built once per searcher/field pair and cached
for subsequent calls. For explicit control over the index lifecycle, use
Suggest(SpellIndex, string, int, int) with a manually built index.
Suggest(SpellIndex, string, int, int)
Suggests corrections using a pre-built SpellIndex. Use this overload when issuing multiple suggestions against the same index to avoid rebuilding the trigram index on every call.