Highlighter.Net 2.0.0

Highlighter.GetBestFragments Method (Analyzer, String, Int32)

Highlights chosen terms in a text, extracting the most relevant sections. This is a convenience method that calls {@link #getBestFragments(TokenStream, String, int)}

public string[] GetBestFragments(
   Analyzer analyzer,
   string text,
   int maxNumFragments
);

Parameters

analyzer
the analyzer that will be used to split
text
into chunks
text
text to highlight terms in
maxNumFragments
the maximum number of fragments.

Return Value

highlighted text fragments (between 0 and maxNumFragments number of fragments)

See Also

Highlighter Class | Lucene.Net.Highlight Namespace | Highlighter.GetBestFragments Overload List