blob: acd1e84045aab0b4f96400c05886877e988b48ee [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.TopFieldCollector 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="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html">TopFieldCollector</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Lucene.Net.Search.TopFieldCollector Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html" title="Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc. ">Collector</a> that sorts by <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html" title="Stores information about how to sort documents by terms in an individual field. Fields must be indexe...">SortField</a> using <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_field_comparator.html" title="Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top r...">FieldComparator</a>s. See the <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html#acb40dd39119e08534429eb92f0e3ab5f" title="Creates a new TopFieldCollector from the given arguments.">Create</a> method for instantiating a <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html" title="A Collector that sorts by SortField using FieldComparators. See the Create method for instantiating a...">TopFieldCollector</a>.
<a href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html#details">More...</a></p>
<p>Inherits <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html">Lucene.Net.Search.TopDocsCollector&lt; T &gt;</a>.</p>
<p>Inherited by Lucene.Net.Search.TopFieldCollector.MultiComparatorNonScoringCollector, and Lucene.Net.Search.TopFieldCollector.OneComparatorNonScoringCollector.</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:a7e89eaf4bbc7eea24a3b2c4dfde2adac"><td class="memItemLeft" align="right" valign="top">override <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html">TopDocs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html#a7e89eaf4bbc7eea24a3b2c4dfde2adac">NewTopDocs</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_score_doc.html">ScoreDoc</a>[] results, int start)</td></tr>
<tr class="memdesc:a7e89eaf4bbc7eea24a3b2c4dfde2adac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html" title="Represents hits returned by Searcher.Search(Query,Filter,int) and Searcher.Search(Query,int) ">Lucene.Net.Search.TopDocs</a> instance containing the given results. If <code>results</code> is null it means there are no results to return, either because there were 0 calls to collect() or because the arguments to topDocs were invalid. <a href="#a7e89eaf4bbc7eea24a3b2c4dfde2adac"></a><br/></td></tr>
<tr class="separator:a7e89eaf4bbc7eea24a3b2c4dfde2adac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html">Lucene.Net.Search.TopDocsCollector&lt; T &gt;</a></td></tr>
<tr class="memitem:a67468e88f7e0253433b7a5f30b2e303a inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html">TopDocs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html#a67468e88f7e0253433b7a5f30b2e303a">TopDocs</a> ()</td></tr>
<tr class="memdesc:a67468e88f7e0253433b7a5f30b2e303a inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the top docs that were collected by this collector. <a href="#a67468e88f7e0253433b7a5f30b2e303a"></a><br/></td></tr>
<tr class="separator:a67468e88f7e0253433b7a5f30b2e303a inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85bacdd762dbf34ea8d7e02865169531 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html">TopDocs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html#a85bacdd762dbf34ea8d7e02865169531">TopDocs</a> (int start)</td></tr>
<tr class="memdesc:a85bacdd762dbf34ea8d7e02865169531 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the documents in the rage [start .. pq.size()) that were collected by this collector. Note that if start &gt;= pq.size(), an empty <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html" title="Represents hits returned by Searcher.Search(Query,Filter,int) and Searcher.Search(Query,int) ">TopDocs</a> is returned.<br/>
This method is convenient to call if the application allways asks for the last results, starting from the last 'page'.<br/>
<b>NOTE:</b> you cannot call this method more than once for each search execution. If you need to call it more than once, passing each time a different <code>start</code>, you should call <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html#a67468e88f7e0253433b7a5f30b2e303a" title="Returns the top docs that were collected by this collector. ">TopDocs()</a> and work with the returned <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html" title="Represents hits returned by Searcher.Search(Query,Filter,int) and Searcher.Search(Query,int) ">Lucene.Net.Search.TopDocs</a> object, which will contain all the results this search execution collected. <a href="#a85bacdd762dbf34ea8d7e02865169531"></a><br/></td></tr>
<tr class="separator:a85bacdd762dbf34ea8d7e02865169531 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b01f25cd19aad8a9216677f68a92674 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html">TopDocs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html#a5b01f25cd19aad8a9216677f68a92674">TopDocs</a> (int start, int howMany)</td></tr>
<tr class="memdesc:a5b01f25cd19aad8a9216677f68a92674 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the documents in the rage [start .. start+howMany) that were collected by this collector. Note that if start &gt;= pq.size(), an empty <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html" title="Represents hits returned by Searcher.Search(Query,Filter,int) and Searcher.Search(Query,int) ">TopDocs</a> is returned, and if pq.size() - start &lt; howMany, then only the available documents in [start .. pq.size()) are returned.<br/>
This method is useful to call in case pagination of search results is allowed by the search application, as well as it attempts to optimize the memory used by allocating only as much as requested by howMany.<br/>
<b>NOTE:</b> you cannot call this method more than once for each search execution. If you need to call it more than once, passing each time a different range, you should call <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html#a67468e88f7e0253433b7a5f30b2e303a" title="Returns the top docs that were collected by this collector. ">TopDocs()</a> and work with the returned <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html" title="Represents hits returned by Searcher.Search(Query,Filter,int) and Searcher.Search(Query,int) ">Lucene.Net.Search.TopDocs</a> object, which will contain all the results this search execution collected. <a href="#a5b01f25cd19aad8a9216677f68a92674"></a><br/></td></tr>
<tr class="separator:a5b01f25cd19aad8a9216677f68a92674 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html">Lucene.Net.Search.Collector</a></td></tr>
<tr class="memitem:aa8d9d434cf08dd3422210a7c00ec9e80 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#aa8d9d434cf08dd3422210a7c00ec9e80">SetScorer</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_scorer.html">Scorer</a> scorer)</td></tr>
<tr class="memdesc:aa8d9d434cf08dd3422210a7c00ec9e80 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called before successive calls to <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#a125e477dc1b59bbdb22fa71eeac4fd8b" title="Called once for every document matching a query, with the unbased document number.">Collect(int)</a>. Implementations that need the score of the current document (passed-in to <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#a125e477dc1b59bbdb22fa71eeac4fd8b" title="Called once for every document matching a query, with the unbased document number.">Collect(int)</a>), should save the passed-in <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> and call scorer.score() when needed. <a href="#aa8d9d434cf08dd3422210a7c00ec9e80"></a><br/></td></tr>
<tr class="separator:aa8d9d434cf08dd3422210a7c00ec9e80 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a125e477dc1b59bbdb22fa71eeac4fd8b inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#a125e477dc1b59bbdb22fa71eeac4fd8b">Collect</a> (int doc)</td></tr>
<tr class="memdesc:a125e477dc1b59bbdb22fa71eeac4fd8b inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called once for every document matching a query, with the unbased document number. <a href="#a125e477dc1b59bbdb22fa71eeac4fd8b"></a><br/></td></tr>
<tr class="separator:a125e477dc1b59bbdb22fa71eeac4fd8b inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8ff0ddcfa363877a8bb87a31ff38d5d inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#aa8ff0ddcfa363877a8bb87a31ff38d5d">SetNextReader</a> (<a class="el" href="_more_like_this_8cs.html#a2a6914ea10bbe06764856e29e5674e66">IndexReader</a> reader, int docBase)</td></tr>
<tr class="memdesc:aa8ff0ddcfa363877a8bb87a31ff38d5d inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called before collecting from each IndexReader. All doc ids in <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#a125e477dc1b59bbdb22fa71eeac4fd8b" title="Called once for every document matching a query, with the unbased document number.">Collect(int)</a> will correspond to reader. <a href="#aa8ff0ddcfa363877a8bb87a31ff38d5d"></a><br/></td></tr>
<tr class="separator:aa8ff0ddcfa363877a8bb87a31ff38d5d inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_collector"><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-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:acb40dd39119e08534429eb92f0e3ab5f"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html">TopFieldCollector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html#acb40dd39119e08534429eb92f0e3ab5f">Create</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a> sort, int numHits, bool fillFields, bool trackDocScores, bool trackMaxScore, bool docsScoredInOrder)</td></tr>
<tr class="memdesc:acb40dd39119e08534429eb92f0e3ab5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html" title="A Collector that sorts by SortField using FieldComparators. See the Create method for instantiating a...">TopFieldCollector</a> from the given arguments. <a href="#acb40dd39119e08534429eb92f0e3ab5f"></a><br/></td></tr>
<tr class="separator:acb40dd39119e08534429eb92f0e3ab5f"><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:a4d1a9b50983e6291c2870e999f19dc94"><td class="memItemLeft" align="right" valign="top">override bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html#a4d1a9b50983e6291c2870e999f19dc94">AcceptsDocsOutOfOrder</a><code> [get]</code></td></tr>
<tr class="separator:a4d1a9b50983e6291c2870e999f19dc94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header properties_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td colspan="2" onclick="javascript:toggleInherit('properties_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html">Lucene.Net.Search.TopDocsCollector&lt; T &gt;</a></td></tr>
<tr class="memitem:aeff22c23faf95d863bff65fffb40a42e inherit properties_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html#aeff22c23faf95d863bff65fffb40a42e">TotalHits</a><code> [get]</code></td></tr>
<tr class="memdesc:aeff22c23faf95d863bff65fffb40a42e inherit properties_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The total number of documents that matched this query. <a href="#aeff22c23faf95d863bff65fffb40a42e"></a><br/></td></tr>
<tr class="separator:aeff22c23faf95d863bff65fffb40a42e inherit properties_class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header properties_class_lucene_1_1_net_1_1_search_1_1_collector"><td colspan="2" onclick="javascript:toggleInherit('properties_class_lucene_1_1_net_1_1_search_1_1_collector')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html">Lucene.Net.Search.Collector</a></td></tr>
<tr class="memitem:a07ed980f78f4da95c2968646c8b0c279 inherit properties_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="memItemLeft" align="right" valign="top">abstract bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#a07ed980f78f4da95c2968646c8b0c279">AcceptsDocsOutOfOrder</a><code> [get]</code></td></tr>
<tr class="memdesc:a07ed980f78f4da95c2968646c8b0c279 inherit properties_class_lucene_1_1_net_1_1_search_1_1_collector"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return <code>true</code> if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#a125e477dc1b59bbdb22fa71eeac4fd8b" title="Called once for every document matching a query, with the unbased document number.">Collect</a>. Most <a class="el" href="namespace_lucene.html">Lucene</a> <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html" title="The abstract base class for queries. Instantiable subclasses are: TermQuery MultiTermQuery BooleanQ...">Query</a> implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_boolean_query.html" title="A Query that matches documents matching boolean combinations of other queries, e.g. TermQuerys, PhraseQuerys or other BooleanQuerys. ">BooleanQuery</a>) can achieve faster searching if the <code><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html" title="Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc. ">Collector</a></code> allows them to deliver the docIDs out of order. Many collectors don't mind getting docIDs out of order, so it's important to return <code>true</code> here. <a href="#a07ed980f78f4da95c2968646c8b0c279"></a><br/></td></tr>
<tr class="separator:a07ed980f78f4da95c2968646c8b0c279 inherit properties_class_lucene_1_1_net_1_1_search_1_1_collector"><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 <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html" title="Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc. ">Collector</a> that sorts by <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html" title="Stores information about how to sort documents by terms in an individual field. Fields must be indexe...">SortField</a> using <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_field_comparator.html" title="Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top r...">FieldComparator</a>s. </p>
<p>See the <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html#acb40dd39119e08534429eb92f0e3ab5f" title="Creates a new TopFieldCollector from the given arguments.">Create</a> method for instantiating a <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html" title="A Collector that sorts by SortField using FieldComparators. See the Create method for instantiating a...">TopFieldCollector</a>. </p>
<p><b>NOTE:</b> This API is experimental and might change in incompatible ways in the next release.</p>
<p>Definition at line <a class="el" href="_top_field_collector_8cs_source.html#l00035">35</a> of file <a class="el" href="_top_field_collector_8cs_source.html">TopFieldCollector.cs</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="acb40dd39119e08534429eb92f0e3ab5f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html">TopFieldCollector</a> Lucene.Net.Search.TopFieldCollector.Create </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a>&#160;</td>
<td class="paramname"><em>sort</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>numHits</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>fillFields</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>trackDocScores</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>trackMaxScore</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>docsScoredInOrder</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></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>Creates a new <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html" title="A Collector that sorts by SortField using FieldComparators. See the Create method for instantiating a...">TopFieldCollector</a> from the given arguments. </p>
<p><b>NOTE</b>: The instances returned by this method pre-allocate a full array of length <code>numHits</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sort</td><td>the sort criteria (SortFields). </td></tr>
<tr><td class="paramname">numHits</td><td>the number of results to collect. </td></tr>
<tr><td class="paramname">fillFields</td><td>specifies whether the actual field values should be returned on the results (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_field_doc.html" title="Expert: A ScoreDoc which also contains information about how to sort the referenced document...">FieldDoc</a>). </td></tr>
<tr><td class="paramname">trackDocScores</td><td>specifies whether document scores should be tracked and set on the results. Note that if set to false, then the results' scores will be set to Float.NaN. Setting this to true affects performance, as it incurs the score computation on each competitive result. Therefore if document scores are not required by the application, it is recommended to set it to false. </td></tr>
<tr><td class="paramname">trackMaxScore</td><td>specifies whether the query's maxScore should be tracked and set on the resulting <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html" title="Represents hits returned by Searcher.Search(Query,Filter,int) and Searcher.Search(Query,int) ">TopDocs</a>. Note that if set to false, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html#a10241d4a4d05912b89047756953cc097" title="Gets or sets the maximum score value encountered, needed for normalizing. Note that in case scores ar...">TopDocs.MaxScore</a> returns Float.NaN. Setting this to true affects performance as it incurs the score computation on each result. Also, setting this true automatically sets <code>trackDocScores</code> to true as well. </td></tr>
<tr><td class="paramname">docsScoredInOrder</td><td>specifies whether documents are scored in doc Id order or not by the given <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> in <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#aa8d9d434cf08dd3422210a7c00ec9e80" title="Called before successive calls to Collect(int). Implementations that need the score of the current do...">Collector.SetScorer(Scorer)</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_collector.html" title="A Collector that sorts by SortField using FieldComparators. See the Create method for instantiating a...">TopFieldCollector</a> instance which will sort the results by the sort criteria. </dd></dl>
<p>&lt;throws&gt; IOException &lt;/throws&gt; </p>
<p>Definition at line <a class="el" href="_top_field_collector_8cs_source.html#l01012">1012</a> of file <a class="el" href="_top_field_collector_8cs_source.html">TopFieldCollector.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a7e89eaf4bbc7eea24a3b2c4dfde2adac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">override <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html">TopDocs</a> Lucene.Net.Search.TopFieldCollector.NewTopDocs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_score_doc.html">ScoreDoc</a>[]&#160;</td>
<td class="paramname"><em>results</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>start</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs.html" title="Represents hits returned by Searcher.Search(Query,Filter,int) and Searcher.Search(Query,int) ">Lucene.Net.Search.TopDocs</a> instance containing the given results. If <code>results</code> is null it means there are no results to return, either because there were 0 calls to collect() or because the arguments to topDocs were invalid. </p>
<p>Reimplemented from <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_docs_collector_3_01_t_01_4.html#a04dc2431625ba573591266d4fd2201dc">Lucene.Net.Search.TopDocsCollector&lt; T &gt;</a>.</p>
<p>Definition at line <a class="el" href="_top_field_collector_8cs_source.html#l01119">1119</a> of file <a class="el" href="_top_field_collector_8cs_source.html">TopFieldCollector.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a4d1a9b50983e6291c2870e999f19dc94"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">override bool Lucene.Net.Search.TopFieldCollector.AcceptsDocsOutOfOrder</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>Definition at line <a class="el" href="_top_field_collector_8cs_source.html#l01133">1133</a> of file <a class="el" href="_top_field_collector_8cs_source.html">TopFieldCollector.cs</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>core/Search/<a class="el" href="_top_field_collector_8cs_source.html">TopFieldCollector.cs</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 3 2013 02:12:57 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>