
PostingsHighlighter
- Namespace
- Rowles.LeanCorpus.Search.Highlighting
- Assembly
- Rowles.LeanCorpus.dll
Extracts highlighted text snippets using term vector offsets from the index. Unlike Highlighter, this does not re-analyse the stored text; it uses pre-computed start/end character offsets from term vectors to locate query terms in the original field text.
public sealed class PostingsHighlighter : IHighlighter
- Inheritance
-
PostingsHighlighter
- Implements
PostingsHighlighter(string, string)
Initialises a new PostingsHighlighter with the given highlight tags.
GetBestFragment(string, Query, IReadOnlyList<TermVectorEntry>?, int)
Returns the best snippet from text containing highlighted
occurrences of the query terms.
GetBestFragment(string, IReadOnlyList<TermVectorEntry>, IReadOnlySet<string>, int)
Returns the best snippet from text containing highlighted
occurrences of the query terms, using term vector offsets to locate terms.