Highlighter.Net 2.0.0

Highlighter.GetBestFragment Method (Analyzer, String, String)

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

public string GetBestFragment(
   Analyzer analyzer,
   string fieldName,
   string text
);

Parameters

analyzer
the analyzer that will be used to split
text
into chunks
fieldName
Name of field used to influence analyzer's tokenization policy
text
text to highlight terms in

Return Value

highlighted text fragment or null if no terms found

See Also

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