Table of Contents

Public classSealed Highlighter

Namespace
Rowles.LeanLucene.Search.Highlighting
Assembly
Rowles.LeanLucene.dll

Extracts text snippets from stored fields with matching terms highlighted.

public sealed class Highlighter
Highlighter

Public constructor Highlighter(string, string, IAnalyser?)

Initialises a new Highlighter with the given tags and analyser.

Public method ExtractTerms(Query)

Extracts query terms from a TermQuery for use with GetBestFragment.

Public method GetBestFragment(string, IReadOnlySet<string>, int)

Returns the best snippet from text containing highlighted occurrences of the query terms. Returns the original text (truncated) if no matches.