blob: e70e9037ae92aee208ef9b5dcc853cb9c2ecc761 [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.IndexSearcher 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_index_searcher.html">IndexSearcher</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_lucene_1_1_net_1_1_search_1_1_index_searcher-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Lucene.Net.Search.IndexSearcher Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Implements search over a single IndexReader.
<a href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#details">More...</a></p>
<p>Inherits <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html">Lucene.Net.Search.Searcher</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:ad66fd33ef2790d5422a1488baa4a7cbe"><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_index_searcher.html#ad66fd33ef2790d5422a1488baa4a7cbe">IndexSearcher</a> (<a class="el" href="_syns2_index_8cs.html#aada057080323f6e867d8f9c189276716">Directory</a> path)</td></tr>
<tr class="memdesc:ad66fd33ef2790d5422a1488baa4a7cbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a searcher searching the index in the named directory, with readOnly=true <a href="#ad66fd33ef2790d5422a1488baa4a7cbe"></a><br/></td></tr>
<tr class="separator:ad66fd33ef2790d5422a1488baa4a7cbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4165d340afba32b2089446336aee24e4"><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_index_searcher.html#a4165d340afba32b2089446336aee24e4">IndexSearcher</a> (<a class="el" href="_syns2_index_8cs.html#aada057080323f6e867d8f9c189276716">Directory</a> path, bool readOnly)</td></tr>
<tr class="memdesc:a4165d340afba32b2089446336aee24e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a searcher searching the index in the named directory. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the underlying IndexReader. <a href="#a4165d340afba32b2089446336aee24e4"></a><br/></td></tr>
<tr class="separator:a4165d340afba32b2089446336aee24e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2156db1b7422b0ff7f98ea28472e23d9"><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_index_searcher.html#a2156db1b7422b0ff7f98ea28472e23d9">IndexSearcher</a> (<a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a> r)</td></tr>
<tr class="memdesc:a2156db1b7422b0ff7f98ea28472e23d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a searcher searching the provided index <a href="#a2156db1b7422b0ff7f98ea28472e23d9"></a><br/></td></tr>
<tr class="separator:a2156db1b7422b0ff7f98ea28472e23d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afec890d233a9352552fc7bd02e395bfd"><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_index_searcher.html#afec890d233a9352552fc7bd02e395bfd">IndexSearcher</a> (<a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a> reader, <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a>[] subReaders, int[] docStarts)</td></tr>
<tr class="memdesc:afec890d233a9352552fc7bd02e395bfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: directly specify the reader, subReaders and their DocID starts <b>NOTE:</b> This API is experimental and might change in incompatible ways in the next release <a href="#afec890d233a9352552fc7bd02e395bfd"></a><br/></td></tr>
<tr class="separator:afec890d233a9352552fc7bd02e395bfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8fc8c3d082677d990936d2a86fd7a99"><td class="memItemLeft" align="right" valign="top">override int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#ae8fc8c3d082677d990936d2a86fd7a99">DocFreq</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:ae8fc8c3d082677d990936d2a86fd7a99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: Returns the number of documents containing <code>term</code>. Called by search code to compute term weights. <a href="#ae8fc8c3d082677d990936d2a86fd7a99"></a><br/></td></tr>
<tr class="separator:ae8fc8c3d082677d990936d2a86fd7a99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed5283dc1e8c56fa09bb2c82337e9d8b"><td class="memItemLeft" align="right" valign="top">override <a class="el" href="_more_like_this_8cs.html#a2ad6aef8641c7b7a6cf9277f7d54b2cd">Document</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#aed5283dc1e8c56fa09bb2c82337e9d8b">Doc</a> (int i)</td></tr>
<tr class="memdesc:aed5283dc1e8c56fa09bb2c82337e9d8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: Returns the stored fields of document <code>i</code>. <a href="#aed5283dc1e8c56fa09bb2c82337e9d8b"></a><br/></td></tr>
<tr class="separator:aed5283dc1e8c56fa09bb2c82337e9d8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca502cee0c60f02dad219ef8a09bff15"><td class="memItemLeft" align="right" valign="top">override <a class="el" href="_more_like_this_8cs.html#a2ad6aef8641c7b7a6cf9277f7d54b2cd">Document</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#aca502cee0c60f02dad219ef8a09bff15">Doc</a> (int i, <a class="el" href="_directory_reader_8cs.html#a64b447ee53d30ce66ebd27b2715e7bca">FieldSelector</a> fieldSelector)</td></tr>
<tr class="memdesc:aca502cee0c60f02dad219ef8a09bff15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the <a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_document.html" title="Documents are the unit of indexing and search.">Lucene.Net.Documents.Document</a>at the <code>n</code><sup>th</sup> position. The <a class="el" href="interface_lucene_1_1_net_1_1_documents_1_1_field_selector.html" title="Similar to a java.io.FileFilter, the FieldSelector allows one to make decisions about what Fields get...">Lucene.Net.Documents.FieldSelector</a> may be used to determine what <a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_field.html" title="A field is a section of a Document. Each field has two parts, a name and a value. Values may be free ...">Lucene.Net.Documents.Field</a>s to load and how they should be loaded. <a href="#aca502cee0c60f02dad219ef8a09bff15"></a><br/></td></tr>
<tr class="separator:aca502cee0c60f02dad219ef8a09bff15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf7c93a75b6328ce85bb40ef1146e86d"><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_index_searcher.html#abf7c93a75b6328ce85bb40ef1146e86d">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a> weight, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a> filter, int nDocs)</td></tr>
<tr class="memdesc:abf7c93a75b6328ce85bb40ef1146e86d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: Low-level search implementation. Finds the top <code>n</code> hits for <code>query</code>, applying <code>filter</code> if non-null. <a href="#abf7c93a75b6328ce85bb40ef1146e86d"></a><br/></td></tr>
<tr class="separator:abf7c93a75b6328ce85bb40ef1146e86d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85593087d18fb176fb8e944f8726f0ff"><td class="memItemLeft" align="right" valign="top">override <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_docs.html">TopFieldDocs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#a85593087d18fb176fb8e944f8726f0ff">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a> weight, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a> filter, int nDocs, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a> sort)</td></tr>
<tr class="memdesc:a85593087d18fb176fb8e944f8726f0ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: Low-level search implementation with arbitrary sorting. Finds the top <code>n</code> hits for <code>query</code>, applying <code>filter</code> if non-null, and sorting the hits by the criteria in <code>sort</code>. <a href="#a85593087d18fb176fb8e944f8726f0ff"></a><br/></td></tr>
<tr class="separator:a85593087d18fb176fb8e944f8726f0ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4fd3c1f962c5badde16a98e48e54389"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_docs.html">TopFieldDocs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#aa4fd3c1f962c5badde16a98e48e54389">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a> weight, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a> filter, int nDocs, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a> sort, bool fillFields)</td></tr>
<tr class="memdesc:aa4fd3c1f962c5badde16a98e48e54389"><td class="mdescLeft">&#160;</td><td class="mdescRight">Just like <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#a85593087d18fb176fb8e944f8726f0ff" title="Expert: Low-level search implementation with arbitrary sorting. Finds the top n hits for query...">Search(Weight, Filter, int, Sort)</a>, but you choose whether or not the fields in the returned <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> instances should be set by specifying fillFields. NOTE: this does not compute scores by default. If you need scores, create 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 by calling <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.">TopFieldCollector.Create</a> and then pass that to <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#afec19567d857370aeb009824239eee90" title="Lower-level search API.">Search(Weight, Filter, Collector)</a>. <a href="#aa4fd3c1f962c5badde16a98e48e54389"></a><br/></td></tr>
<tr class="separator:aa4fd3c1f962c5badde16a98e48e54389"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afec19567d857370aeb009824239eee90"><td class="memItemLeft" align="right" valign="top">override void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#afec19567d857370aeb009824239eee90">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a> weight, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a> filter, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html">Collector</a> collector)</td></tr>
<tr class="memdesc:afec19567d857370aeb009824239eee90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lower-level search API. <a href="#afec19567d857370aeb009824239eee90"></a><br/></td></tr>
<tr class="separator:afec19567d857370aeb009824239eee90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9771fbcd3c599c6fc25e7f59cfc0a0a6"><td class="memItemLeft" align="right" valign="top">override <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#a9771fbcd3c599c6fc25e7f59cfc0a0a6">Rewrite</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> original)</td></tr>
<tr class="memdesc:a9771fbcd3c599c6fc25e7f59cfc0a0a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: called to re-write queries into primitive queries. <a href="#a9771fbcd3c599c6fc25e7f59cfc0a0a6"></a><br/></td></tr>
<tr class="separator:a9771fbcd3c599c6fc25e7f59cfc0a0a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4b90c9e877499a589d3866be97eb710"><td class="memItemLeft" align="right" valign="top">override <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_explanation.html">Explanation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#af4b90c9e877499a589d3866be97eb710">Explain</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a> weight, int doc)</td></tr>
<tr class="memdesc:af4b90c9e877499a589d3866be97eb710"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: low-level implementation method Returns an <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_explanation.html" title="Expert: Describes the score computation for document and query. ">Explanation</a> that describes how <code>doc</code> scored against <code>weight</code>. <a href="#af4b90c9e877499a589d3866be97eb710"></a><br/></td></tr>
<tr class="separator:af4b90c9e877499a589d3866be97eb710"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79c4d4bc7e575a1043cd6cc2aef1ed4a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#a79c4d4bc7e575a1043cd6cc2aef1ed4a">SetDefaultFieldSortScoring</a> (bool doTrackScores, bool doMaxScore)</td></tr>
<tr class="memdesc:a79c4d4bc7e575a1043cd6cc2aef1ed4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">By default, no scores are computed when sorting by field (using <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a4fa776037fe41a7fccc3c9d32057c258" title="Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-...">Searcher.Search(Query,Filter,int,Sort)</a>). You can change that, per <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html" title="Implements search over a single IndexReader.">IndexSearcher</a> instance, by calling this method. Note that this will incur a CPU cost. <a href="#a79c4d4bc7e575a1043cd6cc2aef1ed4a"></a><br/></td></tr>
<tr class="separator:a79c4d4bc7e575a1043cd6cc2aef1ed4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher')"><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_searcher.html">Lucene.Net.Search.Searcher</a></td></tr>
<tr class="memitem:a4fa776037fe41a7fccc3c9d32057c258 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_docs.html">TopFieldDocs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a4fa776037fe41a7fccc3c9d32057c258">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> query, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a> filter, int n, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a> sort)</td></tr>
<tr class="memdesc:a4fa776037fe41a7fccc3c9d32057c258 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="namespace_lucene_1_1_net_1_1_search.html">Search</a> implementation with arbitrary sorting. Finds the top <code>n</code> hits for <code>query</code>, applying <code>filter</code> if non-null, and sorting the hits by the criteria in <code>sort</code>. <a href="#a4fa776037fe41a7fccc3c9d32057c258"></a><br/></td></tr>
<tr class="separator:a4fa776037fe41a7fccc3c9d32057c258 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a993daff5c91861d5cc44996f3b021f48 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a993daff5c91861d5cc44996f3b021f48">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> query, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html">Collector</a> results)</td></tr>
<tr class="memdesc:a993daff5c91861d5cc44996f3b021f48 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lower-level search API. <a href="#a993daff5c91861d5cc44996f3b021f48"></a><br/></td></tr>
<tr class="separator:a993daff5c91861d5cc44996f3b021f48 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3981f2cc2a97d388a141343d89d525ab inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a3981f2cc2a97d388a141343d89d525ab">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> query, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a> filter, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html">Collector</a> results)</td></tr>
<tr class="memdesc:a3981f2cc2a97d388a141343d89d525ab inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lower-level search API. <a href="#a3981f2cc2a97d388a141343d89d525ab"></a><br/></td></tr>
<tr class="separator:a3981f2cc2a97d388a141343d89d525ab inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa266a774d95218869ce300bd74444151 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">virtual <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_searcher.html#aa266a774d95218869ce300bd74444151">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> query, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a> filter, int n)</td></tr>
<tr class="memdesc:aa266a774d95218869ce300bd74444151 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the top <code>n</code> hits for <code>query</code>, applying <code>filter</code> if non-null. <a href="#aa266a774d95218869ce300bd74444151"></a><br/></td></tr>
<tr class="separator:aa266a774d95218869ce300bd74444151 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15a44f147c6f8a9a9cf56e47dd560c05 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">virtual <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_searcher.html#a15a44f147c6f8a9a9cf56e47dd560c05">Search</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> query, int n)</td></tr>
<tr class="memdesc:a15a44f147c6f8a9a9cf56e47dd560c05 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the top <code>n</code> hits for <code>query</code>. <a href="#a15a44f147c6f8a9a9cf56e47dd560c05"></a><br/></td></tr>
<tr class="separator:a15a44f147c6f8a9a9cf56e47dd560c05 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a508fb2346b1fb8d4d5313304b4fc66fd inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_explanation.html">Explanation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a508fb2346b1fb8d4d5313304b4fc66fd">Explain</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> query, int doc)</td></tr>
<tr class="memdesc:a508fb2346b1fb8d4d5313304b4fc66fd inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_explanation.html" title="Expert: Describes the score computation for document and query. ">Explanation</a> that describes how <code>doc</code> scored against <code>query</code>. <a href="#a508fb2346b1fb8d4d5313304b4fc66fd"></a><br/></td></tr>
<tr class="separator:a508fb2346b1fb8d4d5313304b4fc66fd inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac823ad9f7ea02ee28ebe0ecb45318c95 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#ac823ad9f7ea02ee28ebe0ecb45318c95">CreateWeight</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> query)</td></tr>
<tr class="memdesc:ac823ad9f7ea02ee28ebe0ecb45318c95 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">creates a weight for <code>query</code> <a href="#ac823ad9f7ea02ee28ebe0ecb45318c95"></a><br/></td></tr>
<tr class="separator:ac823ad9f7ea02ee28ebe0ecb45318c95 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a221e8d02e47a3ab1d06978760dbf2e inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><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_searcher.html#a1a221e8d02e47a3ab1d06978760dbf2e">DocFreqs</a> (<a class="el" href="_more_like_this_8cs.html#a8797eb30ce21b31829d3e3a43a20e3b9">Term</a>[] terms)</td></tr>
<tr class="memdesc:a1a221e8d02e47a3ab1d06978760dbf2e inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: For each term in the terms array, calculates the number of documents containing <code>term</code>. Returns an array with these document frequencies. Used to minimize number of remote calls. <a href="#a1a221e8d02e47a3ab1d06978760dbf2e"></a><br/></td></tr>
<tr class="separator:a1a221e8d02e47a3ab1d06978760dbf2e inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d91c9cf8a2a1eca24096df18403985f inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a9d91c9cf8a2a1eca24096df18403985f">Close</a> ()</td></tr>
<tr class="memdesc:a9d91c9cf8a2a1eca24096df18403985f inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees resources associated with this <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html" title="An abstract base class for search implementations. Implements the main search methods.">Searcher</a>. Be careful not to call this method while you are still using objects that reference this searchable <a href="#a9d91c9cf8a2a1eca24096df18403985f"></a><br/></td></tr>
<tr class="separator:a9d91c9cf8a2a1eca24096df18403985f inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3da4fe27c5252338ea8ef7e7c0fb20f2 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a3da4fe27c5252338ea8ef7e7c0fb20f2">Dispose</a> ()</td></tr>
<tr class="separator:a3da4fe27c5252338ea8ef7e7c0fb20f2 inherit pub_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a5cb593c7ae4d9cc57dbac348f257ec43"><td class="memItemLeft" align="right" valign="top">override void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#a5cb593c7ae4d9cc57dbac348f257ec43">Dispose</a> (bool disposing)</td></tr>
<tr class="separator:a5cb593c7ae4d9cc57dbac348f257ec43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_lucene_1_1_net_1_1_search_1_1_searcher')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html">Lucene.Net.Search.Searcher</a></td></tr>
<tr class="memitem:aa44030e43f78fad728e17beeaa4c38ea inherit pro_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><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_searcher.html#aa44030e43f78fad728e17beeaa4c38ea">Searcher</a> ()</td></tr>
<tr class="separator:aa44030e43f78fad728e17beeaa4c38ea inherit pro_methods_class_lucene_1_1_net_1_1_search_1_1_searcher"><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:adf445c7f22d1e5b43539525abf4f8167"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#adf445c7f22d1e5b43539525abf4f8167">IndexReader</a><code> [get]</code></td></tr>
<tr class="memdesc:adf445c7f22d1e5b43539525abf4f8167"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html" title="IndexReader is an abstract class, providing an interface for accessing an index. Search of an index i...">Index.IndexReader</a> this searches. <a href="#adf445c7f22d1e5b43539525abf4f8167"></a><br/></td></tr>
<tr class="separator:adf445c7f22d1e5b43539525abf4f8167"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add409bcc397282dbb545cd6475d49def"><td class="memItemLeft" align="right" valign="top">override int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#add409bcc397282dbb545cd6475d49def">MaxDoc</a><code> [get]</code></td></tr>
<tr class="separator:add409bcc397282dbb545cd6475d49def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3133f69cd1868aaf816d2ed24fbe9620"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#a3133f69cd1868aaf816d2ed24fbe9620">reader_ForNUnit</a><code> [get]</code></td></tr>
<tr class="separator:a3133f69cd1868aaf816d2ed24fbe9620"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header properties_class_lucene_1_1_net_1_1_search_1_1_searcher"><td colspan="2" onclick="javascript:toggleInherit('properties_class_lucene_1_1_net_1_1_search_1_1_searcher')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html">Lucene.Net.Search.Searcher</a></td></tr>
<tr class="memitem:a55a253cf1562ad7f1779d6f76f84c2de inherit properties_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_similarity.html">Similarity</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a55a253cf1562ad7f1779d6f76f84c2de">Similarity</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a55a253cf1562ad7f1779d6f76f84c2de inherit properties_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: Gets or Sets the <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_similarity.html" title="Expert: Scoring API. Subclasses implement search scoring.">Similarity</a> implementation used by this <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html" title="An abstract base class for search implementations. Implements the main search methods.">Searcher</a>. <a href="#a55a253cf1562ad7f1779d6f76f84c2de"></a><br/></td></tr>
<tr class="separator:a55a253cf1562ad7f1779d6f76f84c2de inherit properties_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1dbf54a65f094a455860a8119cbed4e0 inherit properties_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memItemLeft" align="right" valign="top">abstract int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a1dbf54a65f094a455860a8119cbed4e0">MaxDoc</a><code> [get]</code></td></tr>
<tr class="separator:a1dbf54a65f094a455860a8119cbed4e0 inherit properties_class_lucene_1_1_net_1_1_search_1_1_searcher"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header properties_interface_lucene_1_1_net_1_1_search_1_1_searchable"><td colspan="2" onclick="javascript:toggleInherit('properties_interface_lucene_1_1_net_1_1_search_1_1_searchable')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="interface_lucene_1_1_net_1_1_search_1_1_searchable.html">Lucene.Net.Search.Searchable</a></td></tr>
<tr class="memitem:a7396b749dc7342fed0cac9ee9f1bac7f inherit properties_interface_lucene_1_1_net_1_1_search_1_1_searchable"><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_search_1_1_searchable.html#a7396b749dc7342fed0cac9ee9f1bac7f">MaxDoc</a><code> [get]</code></td></tr>
<tr class="memdesc:a7396b749dc7342fed0cac9ee9f1bac7f inherit properties_interface_lucene_1_1_net_1_1_search_1_1_searchable"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expert: Returns one greater than the largest possible document number. Called by search code to compute term weights. <a href="#a7396b749dc7342fed0cac9ee9f1bac7f"></a><br/></td></tr>
<tr class="separator:a7396b749dc7342fed0cac9ee9f1bac7f inherit properties_interface_lucene_1_1_net_1_1_search_1_1_searchable"><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>Implements search over a single IndexReader. </p>
<p>Applications usually need only call the inherited <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a15a44f147c6f8a9a9cf56e47dd560c05" title="Finds the top n hits for query.">Searcher.Search(Query,int)</a> or <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#aa266a774d95218869ce300bd74444151" title="Finds the top n hits for query, applying filter if non-null.">Searcher.Search(Query,Filter,int)</a> methods. For performance reasons it is recommended to open only one <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html" title="Implements search over a single IndexReader.">IndexSearcher</a> and use it for all of your searches.</p>
<p><a class="anchor" id="thread-safety"></a></p>
<p><b>NOTE</b>: <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html" title="Implements search over a single IndexReader.">IndexSearcher</a> instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should <b>not</b> synchronize on the <code><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html" title="Implements search over a single IndexReader.">IndexSearcher</a></code> instance; use your own (non-Lucene) objects instead.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00047">47</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad66fd33ef2790d5422a1488baa4a7cbe"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.IndexSearcher.IndexSearcher </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_syns2_index_8cs.html#aada057080323f6e867d8f9c189276716">Directory</a>&#160;</td>
<td class="paramname"><em>path</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a searcher searching the index in the named directory, with readOnly=true</p>
<p>&lt;throws&gt;CorruptIndexException if the index is corrupt&lt;/throws&gt; &lt;throws&gt;IOException if there is a low-level IO error&lt;/throws&gt; </p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00062">62</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a4165d340afba32b2089446336aee24e4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.IndexSearcher.IndexSearcher </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_syns2_index_8cs.html#aada057080323f6e867d8f9c189276716">Directory</a>&#160;</td>
<td class="paramname"><em>path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>readOnly</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a searcher searching the index in the named directory. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the underlying IndexReader. </p>
<p>&lt;throws&gt; CorruptIndexException if the index is corrupt &lt;/throws&gt; &lt;throws&gt; IOException if there is a low-level IO error &lt;/throws&gt; </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">path</td><td>directory where IndexReader will be opened </td></tr>
<tr><td class="paramname">readOnly</td><td>if true, the underlying IndexReader will be opened readOnly </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00080">80</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a2156db1b7422b0ff7f98ea28472e23d9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.IndexSearcher.IndexSearcher </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a>&#160;</td>
<td class="paramname"><em>r</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a searcher searching the provided index </p>
<p>Note that the underlying IndexReader is not closed, if <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html" title="Implements search over a single IndexReader.">IndexSearcher</a> was constructed with <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#a2156db1b7422b0ff7f98ea28472e23d9" title="Creates a searcher searching the provided index">IndexSearcher(IndexReader r)</a>. If the IndexReader was supplied implicitly by specifying a directory, then the IndexReader gets closed. </p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00092">92</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="afec890d233a9352552fc7bd02e395bfd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.IndexSearcher.IndexSearcher </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a>&#160;</td>
<td class="paramname"><em>reader</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a>[]&#160;</td>
<td class="paramname"><em>subReaders</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int[]&#160;</td>
<td class="paramname"><em>docStarts</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Expert: directly specify the reader, subReaders and their DocID starts <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="_index_searcher_8cs_source.html#l00104">104</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5cb593c7ae4d9cc57dbac348f257ec43"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">override void Lucene.Net.Search.IndexSearcher.Dispose </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>disposing</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a2bfcd76a50ad2c8d13767f380420ceb4">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00140">140</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="aed5283dc1e8c56fa09bb2c82337e9d8b"></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="_more_like_this_8cs.html#a2ad6aef8641c7b7a6cf9277f7d54b2cd">Document</a> Lucene.Net.Search.IndexSearcher.Doc </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>i</em></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>Expert: Returns the stored fields of document <code>i</code>.</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#ae5a8698ada40868908ea27f502337ee2" title="Returns the stored fields of the nth Document in this index. NOTE: for performance reasons...">Lucene.Net.Index.IndexReader.Document(int)</a></dd></dl>
<p>&lt;throws&gt; CorruptIndexException if the index is corrupt &lt;/throws&gt; &lt;throws&gt; IOException if there is a low-level IO error &lt;/throws&gt; </p>
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a9d0023e8f18632fe0709e9c40155dbca">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00160">160</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="aca502cee0c60f02dad219ef8a09bff15"></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="_more_like_this_8cs.html#a2ad6aef8641c7b7a6cf9277f7d54b2cd">Document</a> Lucene.Net.Search.IndexSearcher.Doc </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_directory_reader_8cs.html#a64b447ee53d30ce66ebd27b2715e7bca">FieldSelector</a>&#160;</td>
<td class="paramname"><em>fieldSelector</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>Get the <a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_document.html" title="Documents are the unit of indexing and search.">Lucene.Net.Documents.Document</a>at the <code>n</code><sup>th</sup> position. The <a class="el" href="interface_lucene_1_1_net_1_1_documents_1_1_field_selector.html" title="Similar to a java.io.FileFilter, the FieldSelector allows one to make decisions about what Fields get...">Lucene.Net.Documents.FieldSelector</a> may be used to determine what <a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_field.html" title="A field is a section of a Document. Each field has two parts, a name and a value. Values may be free ...">Lucene.Net.Documents.Field</a>s to load and how they should be loaded. </p>
<p><b>NOTE:</b> If the underlying Reader (more specifically, the underlying <code>FieldsReader</code>) is closed before the lazy <a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_field.html" title="A field is a section of a Document. Each field has two parts, a name and a value. Values may be free ...">Lucene.Net.Documents.Field</a> is loaded an exception may be thrown. If you want the value of a lazy <a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_field.html" title="A field is a section of a Document. Each field has two parts, a name and a value. Values may be free ...">Lucene.Net.Documents.Field</a> to be available after closing you must explicitly load it or fetch the Document again with a new loader.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">n</td><td>Get the document at the <code>n</code><sup>th</sup> position </td></tr>
<tr><td class="paramname">fieldSelector</td><td>The <a class="el" href="interface_lucene_1_1_net_1_1_documents_1_1_field_selector.html" title="Similar to a java.io.FileFilter, the FieldSelector allows one to make decisions about what Fields get...">Lucene.Net.Documents.FieldSelector</a> to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The stored fields of the <a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_document.html" title="Documents are the unit of indexing and search.">Lucene.Net.Documents.Document</a> at the nth position </dd></dl>
<p>&lt;throws&gt; CorruptIndexException if the index is corrupt &lt;/throws&gt; &lt;throws&gt; IOException if there is a low-level IO error &lt;/throws&gt; </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#a99b1172ed4efbc8c652bffd267cef2e9" title="Get the Lucene.Net.Documents.Document at the n th position. The FieldSelector may be used to determin...">Lucene.Net.Index.IndexReader.Document(int, FieldSelector)</a></dd></dl>
<dl class="section see"><dt>See Also</dt><dd>IFieldable</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="interface_lucene_1_1_net_1_1_documents_1_1_field_selector.html" title="Similar to a java.io.FileFilter, the FieldSelector allows one to make decisions about what Fields get...">Lucene.Net.Documents.FieldSelector</a></dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_set_based_field_selector.html" title="Declare what fields to load normally and what fields to load lazily">Lucene.Net.Documents.SetBasedFieldSelector</a></dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="class_lucene_1_1_net_1_1_documents_1_1_load_first_field_selector.html" title="Load the First field and break. See FieldSelectorResult.LOAD_AND_BREAK ">Lucene.Net.Documents.LoadFirstFieldSelector</a></dd></dl>
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#aaf7182082d19f57efad539131ff36dd6">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00166">166</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="ae8fc8c3d082677d990936d2a86fd7a99"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">override int Lucene.Net.Search.IndexSearcher.DocFreq </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_index_1_1_term.html">Term</a>&#160;</td>
<td class="paramname"><em>term</em></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>Expert: Returns the number of documents containing <code>term</code>. Called by search code to compute term weights. </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#a64a1dd38f0e39bd79e5f46ce59ce967b" title="Returns the number of documents containing the term t.">Lucene.Net.Index.IndexReader.DocFreq(Term)</a></dd></dl>
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a1a9a74d509b4531b52c11d6678c50259">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00154">154</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="af4b90c9e877499a589d3866be97eb710"></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_explanation.html">Explanation</a> Lucene.Net.Search.IndexSearcher.Explain </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a>&#160;</td>
<td class="paramname"><em>weight</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>doc</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>Expert: low-level implementation method Returns an <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_explanation.html" title="Expert: Describes the score computation for document and query. ">Explanation</a> that describes how <code>doc</code> scored against <code>weight</code>. </p>
<p>This is intended to be used in developing <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_similarity.html" title="Expert: Scoring API. Subclasses implement search scoring.">Similarity</a> implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index. </p>
<p>Applications should call <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a508fb2346b1fb8d4d5313304b4fc66fd" title="Returns an Explanation that describes how doc scored against query.">Searcher.Explain(Query, int)</a>. </p>
<p>&lt;throws&gt; <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_boolean_query_1_1_too_many_clauses.html" title="Thrown when an attempt is made to add more than MaxClauseCount clauses. This typically happens if a P...">BooleanQuery.TooManyClauses</a> &lt;/throws&gt; </p>
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#afc6d4b6f086212446b5f0513a8db5c3f">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00309">309</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a9771fbcd3c599c6fc25e7f59cfc0a0a6"></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_query.html">Query</a> Lucene.Net.Search.IndexSearcher.Rewrite </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a>&#160;</td>
<td class="paramname"><em>query</em></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>Expert: called to re-write queries into primitive queries.</p>
<p>&lt;throws&gt; <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_boolean_query_1_1_too_many_clauses.html" title="Thrown when an attempt is made to add more than MaxClauseCount clauses. This typically happens if a P...">BooleanQuery.TooManyClauses</a> &lt;/throws&gt; </p>
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#ab5df2c95611970cce4acfe077dd3bb7d">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00299">299</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="abf7c93a75b6328ce85bb40ef1146e86d"></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.IndexSearcher.Search </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a>&#160;</td>
<td class="paramname"><em>weight</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a>&#160;</td>
<td class="paramname"><em>filter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>n</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>Expert: Low-level search implementation. Finds the top <code>n</code> hits for <code>query</code>, applying <code>filter</code> if non-null. </p>
<p>Applications should usually call <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a15a44f147c6f8a9a9cf56e47dd560c05" title="Finds the top n hits for query.">Searcher.Search(Query, int)</a> or <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#aa266a774d95218869ce300bd74444151" title="Finds the top n hits for query, applying filter if non-null.">Searcher.Search(Query,Filter,int)</a> instead. </p>
<p>&lt;throws&gt; <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_boolean_query_1_1_too_many_clauses.html" title="Thrown when an attempt is made to add more than MaxClauseCount clauses. This typically happens if a P...">BooleanQuery.TooManyClauses</a> &lt;/throws&gt; </p>
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a31f4ce3d1f9af381a110ec45c837fe6a">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00178">178</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a85593087d18fb176fb8e944f8726f0ff"></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_field_docs.html">TopFieldDocs</a> Lucene.Net.Search.IndexSearcher.Search </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a>&#160;</td>
<td class="paramname"><em>weight</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a>&#160;</td>
<td class="paramname"><em>filter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>n</em>, </td>
</tr>
<tr>
<td class="paramkey"></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>&#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>Expert: Low-level search implementation with arbitrary sorting. Finds the top <code>n</code> hits for <code>query</code>, applying <code>filter</code> if non-null, and sorting the hits by the criteria in <code>sort</code>. </p>
<p>Applications should usually call <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a4fa776037fe41a7fccc3c9d32057c258" title="Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-...">Searcher.Search(Query,Filter,int,Sort)</a> instead.</p>
<p>&lt;throws&gt; <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_boolean_query_1_1_too_many_clauses.html" title="Thrown when an attempt is made to add more than MaxClauseCount clauses. This typically happens if a P...">BooleanQuery.TooManyClauses</a> &lt;/throws&gt; </p>
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a28406e27804d35ec6d0d727b02bb44cd">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00192">192</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="aa4fd3c1f962c5badde16a98e48e54389"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_docs.html">TopFieldDocs</a> Lucene.Net.Search.IndexSearcher.Search </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a>&#160;</td>
<td class="paramname"><em>weight</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a>&#160;</td>
<td class="paramname"><em>filter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>nDocs</em>, </td>
</tr>
<tr>
<td class="paramkey"></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">bool&#160;</td>
<td class="paramname"><em>fillFields</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>Just like <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#a85593087d18fb176fb8e944f8726f0ff" title="Expert: Low-level search implementation with arbitrary sorting. Finds the top n hits for query...">Search(Weight, Filter, int, Sort)</a>, but you choose whether or not the fields in the returned <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> instances should be set by specifying fillFields. NOTE: this does not compute scores by default. If you need scores, create 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 by calling <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.">TopFieldCollector.Create</a> and then pass that to <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html#afec19567d857370aeb009824239eee90" title="Lower-level search API.">Search(Weight, Filter, Collector)</a>. </p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00207">207</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="afec19567d857370aeb009824239eee90"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">override void Lucene.Net.Search.IndexSearcher.Search </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html">Weight</a>&#160;</td>
<td class="paramname"><em>weight</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_filter.html">Filter</a>&#160;</td>
<td class="paramname"><em>filter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html">Collector</a>&#160;</td>
<td class="paramname"><em>collector</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>Lower-level search API. </p>
<p><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.">Collector.Collect(int)</a> is called for every document. <br/>
Collector-based access to remote indexes is discouraged.</p>
<p>Applications should only use this if they need <em>all</em> of the matching documents. The high-level search API (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a15a44f147c6f8a9a9cf56e47dd560c05" title="Finds the top n hits for query.">Searcher.Search(Query,int)</a>) is usually more efficient, as it skips non-high-scoring hits.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">weight</td><td>to match documents </td></tr>
<tr><td class="paramname">filter</td><td>if non-null, used to permit documents to be collected. </td></tr>
<tr><td class="paramname">collector</td><td>to receive hits </td></tr>
</table>
</dd>
</dl>
<p>&lt;throws&gt; <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_boolean_query_1_1_too_many_clauses.html" title="Thrown when an attempt is made to add more than MaxClauseCount clauses. This typically happens if a P...">BooleanQuery.TooManyClauses</a> &lt;/throws&gt; </p>
<p>Implements <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a50f09f6bf527aa3a1e28c120b1dc58ac">Lucene.Net.Search.Searcher</a>.</p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00216">216</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a79c4d4bc7e575a1043cd6cc2aef1ed4a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void Lucene.Net.Search.IndexSearcher.SetDefaultFieldSortScoring </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>doTrackScores</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>doMaxScore</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>By default, no scores are computed when sorting by field (using <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_searcher.html#a4fa776037fe41a7fccc3c9d32057c258" title="Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-...">Searcher.Search(Query,Filter,int,Sort)</a>). You can change that, per <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html" title="Implements search over a single IndexReader.">IndexSearcher</a> instance, by calling this method. Note that this will incur a CPU cost. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">doTrackScores</td><td>If true, then scores are returned for every matching document in <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_top_field_docs.html" title="Represents hits returned by Searcher.Search(Query,Filter,int,Sort). ">TopFieldDocs</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">doMaxScore</td><td>If true, then the max score for all matching docs is computed. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00332">332</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="adf445c7f22d1e5b43539525abf4f8167"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a> Lucene.Net.Search.IndexSearcher.IndexReader</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>Return the <a class="el" href="class_lucene_1_1_net_1_1_index_1_1_index_reader.html" title="IndexReader is an abstract class, providing an interface for accessing an index. Search of an index i...">Index.IndexReader</a> this searches. </p>
<p>Definition at line <a class="el" href="_index_searcher_8cs_source.html#l00136">136</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="add409bcc397282dbb545cd6475d49def"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">override int Lucene.Net.Search.IndexSearcher.MaxDoc</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="_index_searcher_8cs_source.html#l00173">173</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a3133f69cd1868aaf816d2ed24fbe9620"></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="class_lucene_1_1_net_1_1_index_1_1_index_reader.html">IndexReader</a> Lucene.Net.Search.IndexSearcher.reader_ForNUnit</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="_index_searcher_8cs_source.html#l00339">339</a> of file <a class="el" href="_index_searcher_8cs_source.html">IndexSearcher.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="_index_searcher_8cs_source.html">IndexSearcher.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>