blob: a954ea695cdfab74e743db5989b3e7edd66248c9 [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.Weight 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_weight.html">Weight</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_lucene_1_1_net_1_1_search_1_1_weight-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Lucene.Net.Search.Weight Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Expert: Calculate query weights and build query scorers. The purpose of <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a> is to ensure searching does not modify 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>, so that 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> instance can be reused. <br/>
<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> dependent state of the query should reside in the <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a>. <br/>
<a class="el" href="_reader_util_8cs.html#a2a6914ea10bbe06764856e29e5674e66">IndexReader</a> dependent state should reside in the <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_scorer.html" title="Expert: Common scoring functionality for different types of queries.">Scorer</a>. A <code><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a></code> is used in the following way: </p>
<ul>
<li>
A <code><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a></code> is constructed by a top-level query, given a <code><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></code> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html#adb579d26787d010ed599ab01a9b6adae" title="Expert: Constructs an appropriate Weight implementation for this query.">Lucene.Net.Search.Query.CreateWeight(Searcher)</a>). </li>
<li>
The <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a0a9aa5e55306164f0b5e6b8ee30b8a41" title="The sum of squared weights of contained query clauses. ">GetSumOfSquaredWeights()</a> method is called on the <code><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a></code> to compute the query normalization factor <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_similarity.html#a941d4d16d71b59858e360de8c2d59371" title="Computes the normalization value for a query given the sum of the squared weights of each of the quer...">Similarity.QueryNorm(float)</a> of the query clauses contained in the query. </li>
<li>
The query normalization factor is passed to <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a33ec760fdf31354a43b50d7abd53a573" title="Assigns the query normalization factor to this. ">Normalize(float)</a>. At this point the weighting is complete. </li>
<li>
A <code><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></code> is constructed by <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a87064513b858e1608bf7c66731f89a6b" title="Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder. NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call GetScoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order. NOTE: null can be returned if no documents will be scored by this query.">Scorer(IndexReader,bool,bool)</a>. </li>
</ul>
<a href="class_lucene_1_1_net_1_1_search_1_1_weight.html#details">More...</a></p>
<p>Inherited by Lucene.Net.Search.BooleanQuery.BooleanWeight, Lucene.Net.Search.ConstantScoreQuery.ConstantWeight, Lucene.Net.Search.DisjunctionMaxQuery.DisjunctionMaxWeight, Lucene.Net.Search.FilteredQuery.AnonymousClassWeight, Lucene.Net.Search.Function.CustomScoreQuery.CustomWeight, Lucene.Net.Search.Function.ValueSourceQuery.ValueSourceWeight, Lucene.Net.Search.MatchAllDocsQuery.MatchAllDocsWeight, Lucene.Net.Search.MultiPhraseQuery.MultiPhraseWeight, Lucene.Net.Search.PhraseQuery.PhraseWeight, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_spans_1_1_span_weight.html">Lucene.Net.Search.Spans.SpanWeight</a>, Lucene.Net.Search.TermQuery.TermWeight, and <a class="el" href="class_lucene_1_1_net_1_1_spatial_1_1_util_1_1_function_query_1_1_function_weight.html">Lucene.Net.Spatial.Util.FunctionQuery.FunctionWeight</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:a92fcb99f154bb5edd5ba363d3dab0b14"><td class="memItemLeft" align="right" valign="top">abstract <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_weight.html#a92fcb99f154bb5edd5ba363d3dab0b14">Explain</a> (<a class="el" href="_more_like_this_8cs.html#a2a6914ea10bbe06764856e29e5674e66">IndexReader</a> reader, int doc)</td></tr>
<tr class="memdesc:a92fcb99f154bb5edd5ba363d3dab0b14"><td class="mdescLeft">&#160;</td><td class="mdescRight">An explanation of the score computation for the named document. <a href="#a92fcb99f154bb5edd5ba363d3dab0b14"></a><br/></td></tr>
<tr class="separator:a92fcb99f154bb5edd5ba363d3dab0b14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33ec760fdf31354a43b50d7abd53a573"><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_weight.html#a33ec760fdf31354a43b50d7abd53a573">Normalize</a> (float norm)</td></tr>
<tr class="memdesc:a33ec760fdf31354a43b50d7abd53a573"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assigns the query normalization factor to this. <a href="#a33ec760fdf31354a43b50d7abd53a573"></a><br/></td></tr>
<tr class="separator:a33ec760fdf31354a43b50d7abd53a573"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87064513b858e1608bf7c66731f89a6b"><td class="memItemLeft" align="right" valign="top">abstract <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_scorer.html">Scorer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a87064513b858e1608bf7c66731f89a6b">Scorer</a> (<a class="el" href="_more_like_this_8cs.html#a2a6914ea10bbe06764856e29e5674e66">IndexReader</a> reader, bool scoreDocsInOrder, bool topScorer)</td></tr>
<tr class="memdesc:a87064513b858e1608bf7c66731f89a6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_scorer.html" title="Expert: Common scoring functionality for different types of queries.">Scorer</a> which scores documents in/out-of order according to <code>scoreDocsInOrder</code>. <b>NOTE:</b> even if <code>scoreDocsInOrder</code> is false, it is recommended to check whether the returned <code><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></code> indeed scores documents out of order (i.e., call <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#ad298cceb7caae992cbc9770dc5891cf7" title="Returns true iff this implementation scores docs only out of order. This method is used in conjunctio...">GetScoresDocsOutOfOrder()</a>), as some <code><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></code> implementations will always return documents in-order.<br/>
<b>NOTE:</b> null can be returned if no documents will be scored by this query. <a href="#a87064513b858e1608bf7c66731f89a6b"></a><br/></td></tr>
<tr class="separator:a87064513b858e1608bf7c66731f89a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a9aa5e55306164f0b5e6b8ee30b8a41"><td class="memItemLeft" align="right" valign="top">abstract float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a0a9aa5e55306164f0b5e6b8ee30b8a41">GetSumOfSquaredWeights</a> ()</td></tr>
<tr class="memdesc:a0a9aa5e55306164f0b5e6b8ee30b8a41"><td class="mdescLeft">&#160;</td><td class="mdescRight">The sum of squared weights of contained query clauses. <a href="#a0a9aa5e55306164f0b5e6b8ee30b8a41"></a><br/></td></tr>
<tr class="separator:a0a9aa5e55306164f0b5e6b8ee30b8a41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad298cceb7caae992cbc9770dc5891cf7"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#ad298cceb7caae992cbc9770dc5891cf7">GetScoresDocsOutOfOrder</a> ()</td></tr>
<tr class="memdesc:ad298cceb7caae992cbc9770dc5891cf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true iff this implementation scores docs only out of order. This method is used in conjunction with <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>'s <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#a07ed980f78f4da95c2968646c8b0c279">AcceptsDocsOutOfOrder</a> and <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a87064513b858e1608bf7c66731f89a6b" title="Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder. NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call GetScoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order. NOTE: null can be returned if no documents will be scored by this query.">Scorer(Lucene.Net.Index.IndexReader, bool, bool)</a> to create a matching <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> instance for a given <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>, or vice versa. <b>NOTE:</b> the default implementation returns <code>false</code>, i.e. the <code><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></code> scores documents in-order. <a href="#ad298cceb7caae992cbc9770dc5891cf7"></a><br/></td></tr>
<tr class="separator:ad298cceb7caae992cbc9770dc5891cf7"><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:a3e631076861f54ae6f37a51d2b41fd26"><td class="memItemLeft" align="right" valign="top">abstract <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_weight.html#a3e631076861f54ae6f37a51d2b41fd26">Query</a><code> [get]</code></td></tr>
<tr class="memdesc:a3e631076861f54ae6f37a51d2b41fd26"><td class="mdescLeft">&#160;</td><td class="mdescRight">The query that this concerns. <a href="#a3e631076861f54ae6f37a51d2b41fd26"></a><br/></td></tr>
<tr class="separator:a3e631076861f54ae6f37a51d2b41fd26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c76b2c40a71faaa86352b5fe90a4bd0"><td class="memItemLeft" align="right" valign="top">abstract float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a3c76b2c40a71faaa86352b5fe90a4bd0">Value</a><code> [get]</code></td></tr>
<tr class="memdesc:a3c76b2c40a71faaa86352b5fe90a4bd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The weight for this query. <a href="#a3c76b2c40a71faaa86352b5fe90a4bd0"></a><br/></td></tr>
<tr class="separator:a3c76b2c40a71faaa86352b5fe90a4bd0"><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>Expert: Calculate query weights and build query scorers. </p>
<p>The purpose of <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a> is to ensure searching does not modify 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>, so that 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> instance can be reused. <br/>
<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> dependent state of the query should reside in the <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a>. <br/>
<a class="el" href="_reader_util_8cs.html#a2a6914ea10bbe06764856e29e5674e66">IndexReader</a> dependent state should reside in the <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>. </p>
<p>A <code><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a></code> is used in the following way: </p>
<ul>
<li>
A <code><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a></code> is constructed by a top-level query, given a <code><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></code> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html#adb579d26787d010ed599ab01a9b6adae" title="Expert: Constructs an appropriate Weight implementation for this query.">Lucene.Net.Search.Query.CreateWeight(Searcher)</a>). </li>
<li>
The <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a0a9aa5e55306164f0b5e6b8ee30b8a41" title="The sum of squared weights of contained query clauses. ">GetSumOfSquaredWeights()</a> method is called on the <code><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html" title="Expert: Calculate query weights and build query scorers. The purpose of Weight is to ensure searching...">Weight</a></code> to compute the query normalization factor <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_similarity.html#a941d4d16d71b59858e360de8c2d59371" title="Computes the normalization value for a query given the sum of the squared weights of each of the quer...">Similarity.QueryNorm(float)</a> of the query clauses contained in the query. </li>
<li>
The query normalization factor is passed to <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a33ec760fdf31354a43b50d7abd53a573" title="Assigns the query normalization factor to this. ">Normalize(float)</a>. At this point the weighting is complete. </li>
<li>
A <code><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></code> is constructed by <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a87064513b858e1608bf7c66731f89a6b" title="Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder. NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call GetScoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order. NOTE: null can be returned if no documents will be scored by this query.">Scorer(IndexReader,bool,bool)</a>. </li>
</ul>
<p>&lt;since&gt; 2.9 &lt;/since&gt; </p>
<p>Definition at line <a class="el" href="_weight_8cs_source.html#l00050">50</a> of file <a class="el" href="_weight_8cs_source.html">Weight.cs</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a92fcb99f154bb5edd5ba363d3dab0b14"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_explanation.html">Explanation</a> Lucene.Net.Search.Weight.Explain </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_more_like_this_8cs.html#a2a6914ea10bbe06764856e29e5674e66">IndexReader</a>&#160;</td>
<td class="paramname"><em>reader</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">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>An explanation of the score computation for the named document. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">reader</td><td>sub-reader containing the give doc </td></tr>
<tr><td class="paramname">doc</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>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> for the score </dd></dl>
<p>&lt;throws&gt; IOException &lt;/throws&gt; </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_spatial_1_1_util_1_1_function_query_1_1_function_weight.html#a147d940954e704ba3022a5a6579c72d7">Lucene.Net.Spatial.Util.FunctionQuery.FunctionWeight</a>, and <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_spans_1_1_span_weight.html#a65e4d9aa5279522c3c0a8486e544bd27">Lucene.Net.Search.Spans.SpanWeight</a>.</p>
</div>
</div>
<a class="anchor" id="ad298cceb7caae992cbc9770dc5891cf7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool Lucene.Net.Search.Weight.GetScoresDocsOutOfOrder </td>
<td>(</td>
<td class="paramname"></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 true iff this implementation scores docs only out of order. This method is used in conjunction with <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>'s <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_collector.html#a07ed980f78f4da95c2968646c8b0c279">AcceptsDocsOutOfOrder</a> and <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#a87064513b858e1608bf7c66731f89a6b" title="Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder. NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call GetScoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order. NOTE: null can be returned if no documents will be scored by this query.">Scorer(Lucene.Net.Index.IndexReader, bool, bool)</a> to create a matching <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> instance for a given <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>, or vice versa. <b>NOTE:</b> the default implementation returns <code>false</code>, i.e. the <code><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></code> scores documents in-order. </p>
<p>Definition at line <a class="el" href="_weight_8cs_source.html#l00122">122</a> of file <a class="el" href="_weight_8cs_source.html">Weight.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a0a9aa5e55306164f0b5e6b8ee30b8a41"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract float Lucene.Net.Search.Weight.GetSumOfSquaredWeights </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The sum of squared weights of contained query clauses. </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_spatial_1_1_util_1_1_function_query_1_1_function_weight.html#ab8fdec6eced929d3ccede8b2c632a016">Lucene.Net.Spatial.Util.FunctionQuery.FunctionWeight</a>, and <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_spans_1_1_span_weight.html#aa8fe1b261bc9ba61ece412ad37b62af3">Lucene.Net.Search.Spans.SpanWeight</a>.</p>
</div>
</div>
<a class="anchor" id="a33ec760fdf31354a43b50d7abd53a573"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract void Lucene.Net.Search.Weight.Normalize </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>norm</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Assigns the query normalization factor to this. </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_spatial_1_1_util_1_1_function_query_1_1_function_weight.html#acf4f1ef494997ae15f65067806ca7033">Lucene.Net.Spatial.Util.FunctionQuery.FunctionWeight</a>, and <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_spans_1_1_span_weight.html#ab834fae835530448639f6edd09fa80f3">Lucene.Net.Search.Spans.SpanWeight</a>.</p>
</div>
</div>
<a class="anchor" id="a87064513b858e1608bf7c66731f89a6b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_scorer.html">Scorer</a> Lucene.Net.Search.Weight.Scorer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_more_like_this_8cs.html#a2a6914ea10bbe06764856e29e5674e66">IndexReader</a>&#160;</td>
<td class="paramname"><em>reader</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>scoreDocsInOrder</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>topScorer</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">pure 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_scorer.html" title="Expert: Common scoring functionality for different types of queries.">Scorer</a> which scores documents in/out-of order according to <code>scoreDocsInOrder</code>. <b>NOTE:</b> even if <code>scoreDocsInOrder</code> is false, it is recommended to check whether the returned <code><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></code> indeed scores documents out of order (i.e., call <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_weight.html#ad298cceb7caae992cbc9770dc5891cf7" title="Returns true iff this implementation scores docs only out of order. This method is used in conjunctio...">GetScoresDocsOutOfOrder()</a>), as some <code><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></code> implementations will always return documents in-order.<br/>
<b>NOTE:</b> null can be returned if no documents will be scored by this query. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">reader</td><td>the <a class="el" href="_reader_util_8cs.html#a2a6914ea10bbe06764856e29e5674e66">IndexReader</a> for which to return the <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.">Lucene.Net.Search.Scorer</a>. </td></tr>
<tr><td class="paramname">scoreDocsInOrder</td><td>specifies whether in-order scoring of documents is required. Note that if set to false (i.e., out-of-order scoring is required), this method can return whatever scoring mode it supports, as every in-order scorer is also an out-of-order one. However, an out-of-order scorer may not support <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_doc_id_set_iterator.html#a70f16616e044ffd57b07dbc426c34e0d" title="Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if t...">DocIdSetIterator.NextDoc</a> and/or <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_doc_id_set_iterator.html#a4ea4804a0dd948a55077e1dde86b0983" title="Advances to the first beyond the current whose document number is greater than or equal to target...">DocIdSetIterator.Advance(int)</a>, therefore it is recommended to request an in-order scorer if use of these methods is required. </td></tr>
<tr><td class="paramname">topScorer</td><td>if true, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_scorer.html#a23e72c598a4e46bd528ed19b272fc687" title="Scores and collects all matching documents.">Lucene.Net.Search.Scorer.Score(Lucene.Net.Search.Collector)</a> will be called; if false, <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_doc_id_set_iterator.html#a70f16616e044ffd57b07dbc426c34e0d" title="Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if t...">DocIdSetIterator.NextDoc</a> and/or <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_doc_id_set_iterator.html#a4ea4804a0dd948a55077e1dde86b0983" title="Advances to the first beyond the current whose document number is greater than or equal to target...">DocIdSetIterator.Advance(int)</a> will be called. </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_scorer.html" title="Expert: Common scoring functionality for different types of queries.">Scorer</a> which scores documents in/out-of order. </dd></dl>
<p>&lt;throws&gt; IOException &lt;/throws&gt; </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_spatial_1_1_util_1_1_function_query_1_1_function_weight.html#a3b6f69eded0e4fb93194c6e80cea6824">Lucene.Net.Spatial.Util.FunctionQuery.FunctionWeight</a>, and <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_spans_1_1_span_weight.html#acf28e7998b1ef802e2cfd8e61c261a35">Lucene.Net.Search.Spans.SpanWeight</a>.</p>
</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a3e631076861f54ae6f37a51d2b41fd26"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_query.html">Query</a> Lucene.Net.Search.Weight.Query</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>The query that this concerns. </p>
<p>Definition at line <a class="el" href="_weight_8cs_source.html#l00066">66</a> of file <a class="el" href="_weight_8cs_source.html">Weight.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a3c76b2c40a71faaa86352b5fe90a4bd0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract float Lucene.Net.Search.Weight.Value</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>The weight for this query. </p>
<p>Definition at line <a class="el" href="_weight_8cs_source.html#l00069">69</a> of file <a class="el" href="_weight_8cs_source.html">Weight.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="_weight_8cs_source.html">Weight.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>