Section navigation

Public namespace Rowles.LeanCorpus.Search.Suggestions

Classes

Public class AnalysingSuggester

Provides analysed prefix suggestions with an optional context filter.

Public class DidYouMeanSuggester

"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 class FreeTextSuggester

Suggests terms that complete analysed free text in phrase context.

Public class SpellIndex

Pre-built character-trigram inverted index for fast spelling correction. Build once via Build(IndexSearcher, string), then call Suggest(string, int, int) per query. This mirrors the external benchmark baseline's SpellChecker pattern: amortise the dictionary scan at build time, achieve near-constant-time lookups at query time.

Structs

Public struct Suggestion

A spelling correction suggestion with its edit distance and document frequency score.