blob: 1d1b568ceda6c6f08e15c5874d0d29c187f627a0 [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.Index.TermPositions Interface 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_index.html">Index</a></li><li class="navelem"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html">TermPositions</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="interface_lucene_1_1_net_1_1_index_1_1_term_positions-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Lucene.Net.Index.TermPositions Interface Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html" title="TermPositions provides an interface for enumerating the &lt;document, frequency, &lt;position&gt;* &gt; tuples fo...">TermPositions</a> provides an interface for enumerating the &lt;document, frequency, &lt;position&gt;* &gt; tuples for a term. The document and frequency are the same as for a <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html" title="TermDocs provides an interface for enumerating &lt;document, frequency&gt; pairs for a term. The document portion names each document containing the term. Documents are indicated by number. The frequency portion gives the number of times the term occurred in each document. The pairs are ordered by document number. ">TermDocs</a>. The positions portion lists the ordinal positions of each occurrence of a term in a document.
<a href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#details">More...</a></p>
<p>Inherits <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html">Lucene.Net.Index.TermDocs</a>.</p>
<p>Inherited by Lucene.Net.Index.DirectoryReader.MultiTermPositions, <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_filter_index_reader_1_1_filter_term_positions.html">Lucene.Net.Index.FilterIndexReader.FilterTermPositions</a>, Lucene.Net.Index.Memory.MemoryIndex.MemoryIndexReader.MemoryTermPositions, <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_multiple_term_positions.html">Lucene.Net.Index.MultipleTermPositions</a>, Lucene.Net.Index.ParallelReader.ParallelTermPositions, and Lucene.Net.Index.SegmentTermPositions.</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:a122b95806c00faf647a614e84d33dc86"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86">NextPosition</a> ()</td></tr>
<tr class="memdesc:a122b95806c00faf647a614e84d33dc86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns next position in the current document. It is an error to call this more than <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a9518490703cce46b57cf9f931b6edd7c" title="Returns the frequency of the term within the current document. This is invalid until Next() is called...">TermDocs.Freq()</a> times without calling <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a5a07b58ff92edf95aff4fbc264eb12e7" title="Moves to the next pair in the enumeration. Returns true iff there is such a next pair in the enumerat...">TermDocs.Next()</a>This is invalid until <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a5a07b58ff92edf95aff4fbc264eb12e7" title="Moves to the next pair in the enumeration. Returns true iff there is such a next pair in the enumerat...">TermDocs.Next()</a> is called for the first time. <a href="#a122b95806c00faf647a614e84d33dc86"></a><br/></td></tr>
<tr class="separator:a122b95806c00faf647a614e84d33dc86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3740df833e76a4850d88eaab68a9629"><td class="memItemLeft" align="right" valign="top">byte[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#ad3740df833e76a4850d88eaab68a9629">GetPayload</a> (byte[] data, int offset)</td></tr>
<tr class="memdesc:ad3740df833e76a4850d88eaab68a9629"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the payload data at the current term position. This is invalid until <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86" title="Returns next position in the current document. It is an error to call this more than TermDocs...">NextPosition()</a> is called for the first time. This method must not be called more than once after each call of <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86" title="Returns next position in the current document. It is an error to call this more than TermDocs...">NextPosition()</a>. However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons.<br/>
<a href="#ad3740df833e76a4850d88eaab68a9629"></a><br/></td></tr>
<tr class="separator:ad3740df833e76a4850d88eaab68a9629"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html">Lucene.Net.Index.TermDocs</a></td></tr>
<tr class="memitem:a63eba164c41e26450d60753cd548cbcb inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a63eba164c41e26450d60753cd548cbcb">Seek</a> (<a class="el" href="class_lucene_1_1_net_1_1_index_1_1_term.html">Term</a> term)</td></tr>
<tr class="memdesc:a63eba164c41e26450d60753cd548cbcb inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets this to the data for a term. The enumeration is reset to the start of the data for this term. <a href="#a63eba164c41e26450d60753cd548cbcb"></a><br/></td></tr>
<tr class="separator:a63eba164c41e26450d60753cd548cbcb inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3da74fa2092995ebe6e9bea544a2cd91 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a3da74fa2092995ebe6e9bea544a2cd91">Seek</a> (<a class="el" href="class_lucene_1_1_net_1_1_index_1_1_term_enum.html">TermEnum</a> termEnum)</td></tr>
<tr class="memdesc:a3da74fa2092995ebe6e9bea544a2cd91 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets this to the data for the current term in a <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_term_enum.html" title="Abstract class for enumerating terms. Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it. ">TermEnum</a>. This may be optimized in some implementations. <a href="#a3da74fa2092995ebe6e9bea544a2cd91"></a><br/></td></tr>
<tr class="separator:a3da74fa2092995ebe6e9bea544a2cd91 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a07b58ff92edf95aff4fbc264eb12e7 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a5a07b58ff92edf95aff4fbc264eb12e7">Next</a> ()</td></tr>
<tr class="memdesc:a5a07b58ff92edf95aff4fbc264eb12e7 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves to the next pair in the enumeration. Returns true iff there is such a next pair in the enumeration. <a href="#a5a07b58ff92edf95aff4fbc264eb12e7"></a><br/></td></tr>
<tr class="separator:a5a07b58ff92edf95aff4fbc264eb12e7 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04438d982669143e564b4128e96dd6c9 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a04438d982669143e564b4128e96dd6c9">Read</a> (int[] docs, int[] freqs)</td></tr>
<tr class="memdesc:a04438d982669143e564b4128e96dd6c9 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempts to read multiple entries from the enumeration, up to length of <em>docs</em>. Document numbers are stored in <em>docs</em>, and term frequencies are stored in <em>freqs</em>. The <em>freqs</em> array must be as long as the <em>docs</em> array. <a href="#a04438d982669143e564b4128e96dd6c9"></a><br/></td></tr>
<tr class="separator:a04438d982669143e564b4128e96dd6c9 inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a860fa309506967c3206a28f470cde29e inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a860fa309506967c3206a28f470cde29e">SkipTo</a> (int target)</td></tr>
<tr class="memdesc:a860fa309506967c3206a28f470cde29e inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Skips entries to the first beyond the current whose document number is greater than or equal to <em>target</em>. Returns true iff there is such an entry. Behaves as if written: <a href="#a860fa309506967c3206a28f470cde29e"></a><br/></td></tr>
<tr class="separator:a860fa309506967c3206a28f470cde29e inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cc49d963030dda58f218ca274430dbb inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a9cc49d963030dda58f218ca274430dbb">Close</a> ()</td></tr>
<tr class="memdesc:a9cc49d963030dda58f218ca274430dbb inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees associated resources. <a href="#a9cc49d963030dda58f218ca274430dbb"></a><br/></td></tr>
<tr class="separator:a9cc49d963030dda58f218ca274430dbb inherit pub_methods_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><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:adbfebfa3b7a2bd01f3ba0eede68ea964"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#adbfebfa3b7a2bd01f3ba0eede68ea964">PayloadLength</a><code> [get]</code></td></tr>
<tr class="memdesc:adbfebfa3b7a2bd01f3ba0eede68ea964"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the length of the payload at the current term position. This is invalid until <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86" title="Returns next position in the current document. It is an error to call this more than TermDocs...">NextPosition()</a> is called for the first time.<br/>
<a href="#adbfebfa3b7a2bd01f3ba0eede68ea964"></a><br/></td></tr>
<tr class="separator:adbfebfa3b7a2bd01f3ba0eede68ea964"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1cf7385dfc2573ae86d21a6e67ea76c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#af1cf7385dfc2573ae86d21a6e67ea76c">IsPayloadAvailable</a><code> [get]</code></td></tr>
<tr class="memdesc:af1cf7385dfc2573ae86d21a6e67ea76c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86" title="Returns next position in the current document. It is an error to call this more than TermDocs...">NextPosition()</a>. <a href="#af1cf7385dfc2573ae86d21a6e67ea76c"></a><br/></td></tr>
<tr class="separator:af1cf7385dfc2573ae86d21a6e67ea76c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header properties_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td colspan="2" onclick="javascript:toggleInherit('properties_interface_lucene_1_1_net_1_1_index_1_1_term_docs')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html">Lucene.Net.Index.TermDocs</a></td></tr>
<tr class="memitem:af4d11271571bff528c0639eb69cd8b4d inherit properties_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#af4d11271571bff528c0639eb69cd8b4d">Doc</a><code> [get]</code></td></tr>
<tr class="memdesc:af4d11271571bff528c0639eb69cd8b4d inherit properties_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current document number. This is invalid until <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a5a07b58ff92edf95aff4fbc264eb12e7" title="Moves to the next pair in the enumeration. Returns true iff there is such a next pair in the enumerat...">Next()</a> is called for the first time. <a href="#af4d11271571bff528c0639eb69cd8b4d"></a><br/></td></tr>
<tr class="separator:af4d11271571bff528c0639eb69cd8b4d inherit properties_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9518490703cce46b57cf9f931b6edd7c inherit properties_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a9518490703cce46b57cf9f931b6edd7c">Freq</a><code> [get]</code></td></tr>
<tr class="memdesc:a9518490703cce46b57cf9f931b6edd7c inherit properties_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the frequency of the term within the current document. This is invalid until <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a5a07b58ff92edf95aff4fbc264eb12e7" title="Moves to the next pair in the enumeration. Returns true iff there is such a next pair in the enumerat...">Next()</a> is called for the first time. <a href="#a9518490703cce46b57cf9f931b6edd7c"></a><br/></td></tr>
<tr class="separator:a9518490703cce46b57cf9f931b6edd7c inherit properties_interface_lucene_1_1_net_1_1_index_1_1_term_docs"><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><a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html" title="TermPositions provides an interface for enumerating the &lt;document, frequency, &lt;position&gt;* &gt; tuples fo...">TermPositions</a> provides an interface for enumerating the &lt;document, frequency, &lt;position&gt;* &gt; tuples for a term. </p>
<p>The document and frequency are the same as for a <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html" title="TermDocs provides an interface for enumerating &lt;document, frequency&gt; pairs for a term. The document portion names each document containing the term. Documents are indicated by number. The frequency portion gives the number of times the term occurred in each document. The pairs are ordered by document number. ">TermDocs</a>. The positions portion lists the ordinal positions of each occurrence of a term in a document. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html#a1387e3e694830317f2d14143500c20a0" title="Returns an unpositioned Lucene.Net.Index.TermPositions enumerator.">IndexReader.TermPositions()</a></dd></dl>
<p>Definition at line <a class="el" href="_term_positions_8cs_source.html#l00032">32</a> of file <a class="el" href="_term_positions_8cs_source.html">TermPositions.cs</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad3740df833e76a4850d88eaab68a9629"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">byte [] Lucene.Net.Index.TermPositions.GetPayload </td>
<td>(</td>
<td class="paramtype">byte[]&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>offset</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the payload data at the current term position. This is invalid until <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86" title="Returns next position in the current document. It is an error to call this more than TermDocs...">NextPosition()</a> is called for the first time. This method must not be called more than once after each call of <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86" title="Returns next position in the current document. It is an error to call this more than TermDocs...">NextPosition()</a>. However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons.<br/>
</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>the array into which the data of this payload is to be stored, if it is big enough; otherwise, a new byte[] array is allocated for this purpose. </td></tr>
<tr><td class="paramname">offset</td><td>the offset in the array into which the data of this payload is to be stored. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a byte[] array containing the data of this payload </dd></dl>
<p>&lt;throws&gt; IOException &lt;/throws&gt; </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_multiple_term_positions.html#a296679a5068c8aa7b263748094777677">Lucene.Net.Index.MultipleTermPositions</a>, and <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_filter_index_reader_1_1_filter_term_positions.html#af9d27490f609fa0038ebd09607277de3">Lucene.Net.Index.FilterIndexReader.FilterTermPositions</a>.</p>
</div>
</div>
<a class="anchor" id="a122b95806c00faf647a614e84d33dc86"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Lucene.Net.Index.TermPositions.NextPosition </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns next position in the current document. It is an error to call this more than <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a9518490703cce46b57cf9f931b6edd7c" title="Returns the frequency of the term within the current document. This is invalid until Next() is called...">TermDocs.Freq()</a> times without calling <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a5a07b58ff92edf95aff4fbc264eb12e7" title="Moves to the next pair in the enumeration. Returns true iff there is such a next pair in the enumerat...">TermDocs.Next()</a>This is invalid until <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_docs.html#a5a07b58ff92edf95aff4fbc264eb12e7" title="Moves to the next pair in the enumeration. Returns true iff there is such a next pair in the enumerat...">TermDocs.Next()</a> is called for the first time. </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_multiple_term_positions.html#a225afa1410d3a4f5e950d5e80ded30da">Lucene.Net.Index.MultipleTermPositions</a>, and <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_filter_index_reader_1_1_filter_term_positions.html#af447a9ba7b4c0f5beeb74d2a459ea6a2">Lucene.Net.Index.FilterIndexReader.FilterTermPositions</a>.</p>
</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="af1cf7385dfc2573ae86d21a6e67ea76c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool Lucene.Net.Index.TermPositions.IsPayloadAvailable</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86" title="Returns next position in the current document. It is an error to call this more than TermDocs...">NextPosition()</a>. </p>
<p>true if there is a payload available at this position that can be loaded </p>
<p>Definition at line <a class="el" href="_term_positions_8cs_source.html#l00077">77</a> of file <a class="el" href="_term_positions_8cs_source.html">TermPositions.cs</a>.</p>
</div>
</div>
<a class="anchor" id="adbfebfa3b7a2bd01f3ba0eede68ea964"></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.Index.TermPositions.PayloadLength</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the length of the payload at the current term position. This is invalid until <a class="el" href="interface_lucene_1_1_net_1_1_index_1_1_term_positions.html#a122b95806c00faf647a614e84d33dc86" title="Returns next position in the current document. It is an error to call this more than TermDocs...">NextPosition()</a> is called for the first time.<br/>
</p>
<p>length of the current payload in number of bytes </p>
<p>Definition at line <a class="el" href="_term_positions_8cs_source.html#l00047">47</a> of file <a class="el" href="_term_positions_8cs_source.html">TermPositions.cs</a>.</p>
</div>
</div>
<hr/>The documentation for this interface was generated from the following file:<ul>
<li>core/Index/<a class="el" href="_term_positions_8cs_source.html">TermPositions.cs</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 3 2013 02:12:55 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>