blob: 9b899eae2fde77e3736cf541bb9df2acaf6bce16 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>Lucene.Net: Lucene.Net.Search.Highlight.Highlighter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="lucene-net-icon-128x128.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Lucene.Net
&#160;<span id="projectnumber">3.0.3</span>
</div>
<div id="projectbrief">Lucene.Net is a .NET port of the Java Lucene Indexing Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="Index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Packages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Properties</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_lucene.html">Lucene</a></li><li class="navelem"><a class="el" href="namespace_lucene_1_1_net.html">Net</a></li><li class="navelem"><a class="el" href="namespace_lucene_1_1_net_1_1_search.html">Search</a></li><li class="navelem"><a class="el" href="namespace_lucene_1_1_net_1_1_search_1_1_highlight.html">Highlight</a></li><li class="navelem"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html">Highlighter</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Lucene.Net.Search.Highlight.Highlighter Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Class used to markup highlighted terms found in the best sections of a text, using configurable <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_fragmenter.html" title="Implements the policy for breaking text into multiple fragments for consideration by the Highlighter ...">IFragmenter</a>, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_scorer.html" title="Expert: Common scoring functionality for different types of queries.">Scorer</a>, <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_formatter.html" title="Processes terms found in the original text, typically by applying some form of mark-up to highlight t...">IFormatter</a>, <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_encoder.html" title="Encodes original text. The IEncoder works with the Formatter to generate the output.">IEncoder</a> and tokenizers.
<a href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6a18f8599526b2dc936c4cc9717428e9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a6a18f8599526b2dc936c4cc9717428e9">Highlighter</a> (<a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_scorer.html">IScorer</a> fragmentScorer)</td></tr>
<tr class="separator:a6a18f8599526b2dc936c4cc9717428e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a939b9065e0cc7c03aba31b14422c1063"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a939b9065e0cc7c03aba31b14422c1063">Highlighter</a> (<a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_formatter.html">IFormatter</a> formatter, <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_scorer.html">IScorer</a> fragmentScorer)</td></tr>
<tr class="separator:a939b9065e0cc7c03aba31b14422c1063"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd22514f5c24abc730ff7be8bbec7691"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#afd22514f5c24abc730ff7be8bbec7691">Highlighter</a> (<a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_formatter.html">IFormatter</a> formatter, <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_encoder.html">IEncoder</a> encoder, <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_scorer.html">IScorer</a> fragmentScorer)</td></tr>
<tr class="separator:afd22514f5c24abc730ff7be8bbec7691"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d0a851192bdf129e20938adb84520f5"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a8d0a851192bdf129e20938adb84520f5">GetBestFragment</a> (<a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_analyzer.html">Analyzer</a> analyzer, String fieldName, String text)</td></tr>
<tr class="memdesc:a8d0a851192bdf129e20938adb84520f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Highlights chosen terms in a text, extracting the most relevant section. This is a convenience method that calls GetBestFragment(TokenStream, string) <a href="#a8d0a851192bdf129e20938adb84520f5"></a><br/></td></tr>
<tr class="separator:a8d0a851192bdf129e20938adb84520f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81a4c9a57a43f26b7e0c3b929bac6269"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a81a4c9a57a43f26b7e0c3b929bac6269">GetBestFragment</a> (<a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html">TokenStream</a> tokenStream, String text)</td></tr>
<tr class="memdesc:a81a4c9a57a43f26b7e0c3b929bac6269"><td class="mdescLeft">&#160;</td><td class="mdescRight">Highlights chosen terms in a text, extracting the most relevant section. The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragment with the highest score is returned <a href="#a81a4c9a57a43f26b7e0c3b929bac6269"></a><br/></td></tr>
<tr class="separator:a81a4c9a57a43f26b7e0c3b929bac6269"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26632efddcf495c94833113abc037122"><td class="memItemLeft" align="right" valign="top">String[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a26632efddcf495c94833113abc037122">GetBestFragments</a> (<a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_analyzer.html">Analyzer</a> analyzer, String fieldName, String text, int maxNumFragments)</td></tr>
<tr class="memdesc:a26632efddcf495c94833113abc037122"><td class="mdescLeft">&#160;</td><td class="mdescRight">Highlights chosen terms in a text, extracting the most relevant sections. This is a convenience method that calls GetBestFragments(TokenStream, string, int) <a href="#a26632efddcf495c94833113abc037122"></a><br/></td></tr>
<tr class="separator:a26632efddcf495c94833113abc037122"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65903721c3dae991f3814047bdcedceb"><td class="memItemLeft" align="right" valign="top">String[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a65903721c3dae991f3814047bdcedceb">GetBestFragments</a> (<a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html">TokenStream</a> tokenStream, String text, int maxNumFragments)</td></tr>
<tr class="memdesc:a65903721c3dae991f3814047bdcedceb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Highlights chosen terms in a text, extracting the most relevant sections. The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragments with the highest scores are returned as an array of strings in order of score (contiguous fragments are merged into one in their original order to improve readability) <a href="#a65903721c3dae991f3814047bdcedceb"></a><br/></td></tr>
<tr class="separator:a65903721c3dae991f3814047bdcedceb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adba58146b74b0d4539cef35c2080e90b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_text_fragment.html">TextFragment</a>[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#adba58146b74b0d4539cef35c2080e90b">GetBestTextFragments</a> (<a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html">TokenStream</a> tokenStream, String text, bool mergeContiguousFragments, int maxNumFragments)</td></tr>
<tr class="memdesc:adba58146b74b0d4539cef35c2080e90b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Low level api to get the most relevant (formatted) sections of the document. This method has been made public to allow visibility of score information held in <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_text_fragment.html" title="Low-level class used to record information about a section of a document with a score. ">TextFragment</a> objects. Thanks to Jason Calabrese for help in redefining the interface. <a href="#adba58146b74b0d4539cef35c2080e90b"></a><br/></td></tr>
<tr class="separator:adba58146b74b0d4539cef35c2080e90b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6b727708a6c68cfa6fe0e253667aa7b"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#ab6b727708a6c68cfa6fe0e253667aa7b">GetBestFragments</a> (<a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html">TokenStream</a> tokenStream, String text, int maxNumFragments, String separator)</td></tr>
<tr class="memdesc:ab6b727708a6c68cfa6fe0e253667aa7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Highlights terms in the text , extracting the most relevant sections and concatenating the chosen fragments with a separator (typically "..."). The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragments with the highest scores are returned in order as "separator" delimited strings. <a href="#ab6b727708a6c68cfa6fe0e253667aa7b"></a><br/></td></tr>
<tr class="separator:ab6b727708a6c68cfa6fe0e253667aa7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a3711a119f455fbfc463d5ba2c8ce239b"><td class="memItemLeft" align="right" valign="top">static readonly int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a3711a119f455fbfc463d5ba2c8ce239b">DEFAULT_MAX_CHARS_TO_ANALYZE</a> = 50*1024</td></tr>
<tr class="separator:a3711a119f455fbfc463d5ba2c8ce239b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a75f8171d3baa3baa9f871fbc1636d9c1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a75f8171d3baa3baa9f871fbc1636d9c1">MaxDocCharsToAnalyze</a><code> [get, set]</code></td></tr>
<tr class="separator:a75f8171d3baa3baa9f871fbc1636d9c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55287b5845ede3f4294725b5b2fc44e0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_fragmenter.html">IFragmenter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a55287b5845ede3f4294725b5b2fc44e0">TextFragmenter</a><code> [get, set]</code></td></tr>
<tr class="separator:a55287b5845ede3f4294725b5b2fc44e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fb5f9f79c283844465ba7b2608af48f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_scorer.html">IScorer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a7fb5f9f79c283844465ba7b2608af48f">FragmentScorer</a><code> [get, set]</code></td></tr>
<tr class="separator:a7fb5f9f79c283844465ba7b2608af48f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36eee1a65f0c2a65219d2dbf3891b36f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_encoder.html">IEncoder</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_highlighter.html#a36eee1a65f0c2a65219d2dbf3891b36f">Encoder</a><code> [get, set]</code></td></tr>
<tr class="separator:a36eee1a65f0c2a65219d2dbf3891b36f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class used to markup highlighted terms found in the best sections of a text, using configurable <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_fragmenter.html" title="Implements the policy for breaking text into multiple fragments for consideration by the Highlighter ...">IFragmenter</a>, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_scorer.html" title="Expert: Common scoring functionality for different types of queries.">Scorer</a>, <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_formatter.html" title="Processes terms found in the original text, typically by applying some form of mark-up to highlight t...">IFormatter</a>, <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_encoder.html" title="Encodes original text. The IEncoder works with the Formatter to generate the output.">IEncoder</a> and tokenizers. </p>
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00034">34</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6a18f8599526b2dc936c4cc9717428e9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.Highlight.Highlighter.Highlighter </td>
<td>(</td>
<td class="paramtype"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_scorer.html">IScorer</a>&#160;</td>
<td class="paramname"><em>fragmentScorer</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00044">44</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a939b9065e0cc7c03aba31b14422c1063"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.Highlight.Highlighter.Highlighter </td>
<td>(</td>
<td class="paramtype"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_formatter.html">IFormatter</a>&#160;</td>
<td class="paramname"><em>formatter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_scorer.html">IScorer</a>&#160;</td>
<td class="paramname"><em>fragmentScorer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00050">50</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="afd22514f5c24abc730ff7be8bbec7691"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.Highlight.Highlighter.Highlighter </td>
<td>(</td>
<td class="paramtype"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_formatter.html">IFormatter</a>&#160;</td>
<td class="paramname"><em>formatter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_encoder.html">IEncoder</a>&#160;</td>
<td class="paramname"><em>encoder</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_scorer.html">IScorer</a>&#160;</td>
<td class="paramname"><em>fragmentScorer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00056">56</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a8d0a851192bdf129e20938adb84520f5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">String Lucene.Net.Search.Highlight.Highlighter.GetBestFragment </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_analyzer.html">Analyzer</a>&#160;</td>
<td class="paramname"><em>analyzer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>fieldName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>text</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Highlights chosen terms in a text, extracting the most relevant section. This is a convenience method that calls GetBestFragment(TokenStream, string) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">analyzer</td><td>the analyzer that will be used to split <code>text</code> into chunks</td></tr>
<tr><td class="paramname">fieldName</td><td>Name of field used to influence analyzer's tokenization policy</td></tr>
<tr><td class="paramname">text</td><td>text to highlight terms in</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>highlighted text fragment or null if no terms found</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_invalid_token_offsets_exception.html">InvalidTokenOffsetsException</a></td><td>thrown if any token's endOffset exceeds the provided text's length</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00072">72</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a81a4c9a57a43f26b7e0c3b929bac6269"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">String Lucene.Net.Search.Highlight.Highlighter.GetBestFragment </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html">TokenStream</a>&#160;</td>
<td class="paramname"><em>tokenStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>text</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Highlights chosen terms in a text, extracting the most relevant section. The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragment with the highest score is returned </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tokenStream</td><td>a stream of tokens identified in the text parameter, including offset information. This is typically produced by an analyzer re-parsing a document's text. Some work may be done on retrieving TokenStreams more efficiently by adding support for storing original text position data in the <a class="el" href="namespace_lucene.html">Lucene</a> index but this support is not currently available (as of <a class="el" href="namespace_lucene.html">Lucene</a> 1.4 rc2). </td></tr>
<tr><td class="paramname">text</td><td>text to highlight terms in</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>highlighted text fragment or null if no terms found</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_invalid_token_offsets_exception.html">InvalidTokenOffsetsException</a></td><td>thrown if any token's endOffset exceeds the provided text's length</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00094">94</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a26632efddcf495c94833113abc037122"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">String [] Lucene.Net.Search.Highlight.Highlighter.GetBestFragments </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_analyzer.html">Analyzer</a>&#160;</td>
<td class="paramname"><em>analyzer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>fieldName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>maxNumFragments</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Highlights chosen terms in a text, extracting the most relevant sections. This is a convenience method that calls GetBestFragments(TokenStream, string, int) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">analyzer</td><td>the analyzer that will be used to split <code>text</code> into chunks</td></tr>
<tr><td class="paramname">fieldName</td><td>the name of the field being highlighted (used by analyzer)</td></tr>
<tr><td class="paramname">text</td><td>text to highlight terms in</td></tr>
<tr><td class="paramname">maxNumFragments</td><td>the maximum number of fragments.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>highlighted text fragments (between 0 and maxNumFragments number of fragments)</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_invalid_token_offsets_exception.html">InvalidTokenOffsetsException</a></td><td>thrown if any token's endOffset exceeds the provided text's length</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00114">114</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a65903721c3dae991f3814047bdcedceb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">String [] Lucene.Net.Search.Highlight.Highlighter.GetBestFragments </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html">TokenStream</a>&#160;</td>
<td class="paramname"><em>tokenStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>maxNumFragments</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Highlights chosen terms in a text, extracting the most relevant sections. The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragments with the highest scores are returned as an array of strings in order of score (contiguous fragments are merged into one in their original order to improve readability) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tokenStream</td><td></td></tr>
<tr><td class="paramname">text</td><td>text to highlight terms in</td></tr>
<tr><td class="paramname">maxNumFragments</td><td>the maximum number of fragments.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>highlighted text fragments (between 0 and maxNumFragments number of fragments)</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_invalid_token_offsets_exception.html">InvalidTokenOffsetsException</a></td><td>thrown if any token's endOffset exceeds the provided text's length</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00136">136</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="ab6b727708a6c68cfa6fe0e253667aa7b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">String Lucene.Net.Search.Highlight.Highlighter.GetBestFragments </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html">TokenStream</a>&#160;</td>
<td class="paramname"><em>tokenStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>maxNumFragments</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>separator</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Highlights terms in the text , extracting the most relevant sections and concatenating the chosen fragments with a separator (typically "..."). The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragments with the highest scores are returned in order as "separator" delimited strings. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tokenStream</td><td></td></tr>
<tr><td class="paramname">text</td><td>text to highlight terms in</td></tr>
<tr><td class="paramname">maxNumFragments</td><td>the maximum number of fragments.</td></tr>
<tr><td class="paramname">separator</td><td>the separator used to intersperse the document fragments (typically "...")</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>highlighted text</dd></dl>
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00417">417</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="adba58146b74b0d4539cef35c2080e90b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_text_fragment.html">TextFragment</a> [] Lucene.Net.Search.Highlight.Highlighter.GetBestTextFragments </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html">TokenStream</a>&#160;</td>
<td class="paramname"><em>tokenStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">String&#160;</td>
<td class="paramname"><em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>mergeContiguousFragments</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>maxNumFragments</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Low level api to get the most relevant (formatted) sections of the document. This method has been made public to allow visibility of score information held in <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_highlight_1_1_text_fragment.html" title="Low-level class used to record information about a section of a document with a score. ">TextFragment</a> objects. Thanks to Jason Calabrese for help in redefining the interface. </p>
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00159">159</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a3711a119f455fbfc463d5ba2c8ce239b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">readonly int Lucene.Net.Search.Highlight.Highlighter.DEFAULT_MAX_CHARS_TO_ANALYZE = 50*1024</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00036">36</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a36eee1a65f0c2a65219d2dbf3891b36f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_encoder.html">IEncoder</a> Lucene.Net.Search.Highlight.Highlighter.Encoder</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00456">456</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a7fb5f9f79c283844465ba7b2608af48f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_scorer.html">IScorer</a> Lucene.Net.Search.Highlight.Highlighter.FragmentScorer</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00450">450</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a75f8171d3baa3baa9f871fbc1636d9c1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int Lucene.Net.Search.Highlight.Highlighter.MaxDocCharsToAnalyze</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00437">437</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a55287b5845ede3f4294725b5b2fc44e0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_highlight_1_1_i_fragmenter.html">IFragmenter</a> Lucene.Net.Search.Highlight.Highlighter.TextFragmenter</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_highlighter_8cs_source.html#l00444">444</a> of file <a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>contrib/Highlighter/<a class="el" href="_highlighter_8cs_source.html">Highlighter.cs</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 3 2013 02:12:58 for Lucene.Net by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3
</small></address>
</body>
</html>