blob: 36800c66c9242a8d16b7f6f1ad8719758aec80cb [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.Sort 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_sort.html">Sort</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="class_lucene_1_1_net_1_1_search_1_1_sort-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Lucene.Net.Search.Sort Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Encapsulates sort criteria for returned hits.
<a href="class_lucene_1_1_net_1_1_search_1_1_sort.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a587d838350e158068bb3b42faf49fb9a"><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_sort.html#a587d838350e158068bb3b42faf49fb9a">Sort</a> ()</td></tr>
<tr class="memdesc:a587d838350e158068bb3b42faf49fb9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorts by computed relevance. This is the same sort criteria as calling <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>without a sort criteria, only with slightly more overhead. <a href="#a587d838350e158068bb3b42faf49fb9a"></a><br/></td></tr>
<tr class="separator:a587d838350e158068bb3b42faf49fb9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a603ce9031a175c80f10e6a1f3a2edc9c"><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_sort.html#a603ce9031a175c80f10e6a1f3a2edc9c">Sort</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a> field)</td></tr>
<tr class="memdesc:a603ce9031a175c80f10e6a1f3a2edc9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorts by the criteria in the given <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html" title="Stores information about how to sort documents by terms in an individual field. Fields must be indexe...">SortField</a>. <a href="#a603ce9031a175c80f10e6a1f3a2edc9c"></a><br/></td></tr>
<tr class="separator:a603ce9031a175c80f10e6a1f3a2edc9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a239aee9c6be8f96aa26a87941c00aa80"><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_sort.html#a239aee9c6be8f96aa26a87941c00aa80">Sort</a> (params <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a>[] fields)</td></tr>
<tr class="memdesc:a239aee9c6be8f96aa26a87941c00aa80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorts in succession by the criteria in each <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html" title="Stores information about how to sort documents by terms in an individual field. Fields must be indexe...">SortField</a>. <a href="#a239aee9c6be8f96aa26a87941c00aa80"></a><br/></td></tr>
<tr class="separator:a239aee9c6be8f96aa26a87941c00aa80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9915d029ebb2b9ee789c364770ba675"><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_sort.html#ad9915d029ebb2b9ee789c364770ba675">SetSort</a> (<a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a> field)</td></tr>
<tr class="memdesc:ad9915d029ebb2b9ee789c364770ba675"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the sort to the given criteria. <a href="#ad9915d029ebb2b9ee789c364770ba675"></a><br/></td></tr>
<tr class="separator:ad9915d029ebb2b9ee789c364770ba675"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaacc57f0346b140712d25bd138d36e7"><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_sort.html#aaaacc57f0346b140712d25bd138d36e7">SetSort</a> (params <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a>[] fields)</td></tr>
<tr class="memdesc:aaaacc57f0346b140712d25bd138d36e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the sort to the given criteria in succession. <a href="#aaaacc57f0346b140712d25bd138d36e7"></a><br/></td></tr>
<tr class="separator:aaaacc57f0346b140712d25bd138d36e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa38cb1fce0ec08dc8b3453ec5a573191"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a>[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html#aa38cb1fce0ec08dc8b3453ec5a573191">GetSort</a> ()</td></tr>
<tr class="memdesc:aa38cb1fce0ec08dc8b3453ec5a573191"><td class="mdescLeft">&#160;</td><td class="mdescRight">Representation of the sort criteria. <a href="#aa38cb1fce0ec08dc8b3453ec5a573191"></a><br/></td></tr>
<tr class="separator:aa38cb1fce0ec08dc8b3453ec5a573191"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e0f632c6a87afacc650788336769efa"><td class="memItemLeft" align="right" valign="top">override System.String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html#a5e0f632c6a87afacc650788336769efa">ToString</a> ()</td></tr>
<tr class="separator:a5e0f632c6a87afacc650788336769efa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae00f9ae265dabdbc008760ccf54b8356"><td class="memItemLeft" align="right" valign="top">override bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html#ae00f9ae265dabdbc008760ccf54b8356">Equals</a> (System.Object o)</td></tr>
<tr class="memdesc:ae00f9ae265dabdbc008760ccf54b8356"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if <code>o</code> is equal to this. <a href="#ae00f9ae265dabdbc008760ccf54b8356"></a><br/></td></tr>
<tr class="separator:ae00f9ae265dabdbc008760ccf54b8356"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3155add53221e39860d8fadb41d5d6f"><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_sort.html#ac3155add53221e39860d8fadb41d5d6f">GetHashCode</a> ()</td></tr>
<tr class="memdesc:ac3155add53221e39860d8fadb41d5d6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a hash code value for this object. <a href="#ac3155add53221e39860d8fadb41d5d6f"></a><br/></td></tr>
<tr class="separator:ac3155add53221e39860d8fadb41d5d6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a520383543bbf07b1f3cfe95467d3d61b"><td class="memItemLeft" align="right" valign="top">static readonly <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html#a520383543bbf07b1f3cfe95467d3d61b">RELEVANCE</a> = new <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a>()</td></tr>
<tr class="memdesc:a520383543bbf07b1f3cfe95467d3d61b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents sorting by computed relevance. Using this sort criteria returns the same results as calling <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>Searcher::search()without a sort criteria, only with slightly more overhead. <a href="#a520383543bbf07b1f3cfe95467d3d61b"></a><br/></td></tr>
<tr class="separator:a520383543bbf07b1f3cfe95467d3d61b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a378a01bda54bbfb4ba860a069c76de39"><td class="memItemLeft" align="right" valign="top">static readonly <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html#a378a01bda54bbfb4ba860a069c76de39">INDEXORDER</a></td></tr>
<tr class="memdesc:a378a01bda54bbfb4ba860a069c76de39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents sorting by index order. <a href="#a378a01bda54bbfb4ba860a069c76de39"></a><br/></td></tr>
<tr class="separator:a378a01bda54bbfb4ba860a069c76de39"><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>Encapsulates sort criteria for returned hits. </p>
<p>The fields used to determine sort order must be carefully chosen. <a class="el" href="namespace_lucene_1_1_net_1_1_documents.html">Documents</a> must contain a single term in such a field, and the value of the term should indicate the document's relative position in a given sort order. The field must be indexed, but should not be tokenized, and does not need to be stored (unless you happen to want it back with the rest of your document data). In other words:</p>
<p><code>document.add (new Field ("byNumber", Integer.toString(x), Field.Store.NO, Field.Index.NOT_ANALYZED));</code></p>
<h3>Valid Types of Values</h3>
<p>There are four possible kinds of term values which may be put into sorting fields: Integers, Longs, Floats, or Strings. Unless <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a> objects are specified, the type of value in the field is determined by parsing the first term in the field.</p>
<p>Integer term values should contain only digits and an optional preceding negative sign. Values must be base 10 and in the range <code>Integer.MIN_VALUE</code> and <code>Integer.MAX_VALUE</code> inclusive. <a class="el" href="namespace_lucene_1_1_net_1_1_documents.html">Documents</a> which should appear first in the sort should have low value integers, later documents high values (i.e. the documents should be numbered <code>1..n</code> where <code>1</code> is the first and <code>n</code> the last).</p>
<p>Long term values should contain only digits and an optional preceding negative sign. Values must be base 10 and in the range <code>Long.MIN_VALUE</code> and <code>Long.MAX_VALUE</code> inclusive. <a class="el" href="namespace_lucene_1_1_net_1_1_documents.html">Documents</a> which should appear first in the sort should have low value integers, later documents high values.</p>
<p>Float term values should conform to values accepted by float.Parse(string) (except that <code>NaN</code> and <code>Infinity</code> are not supported). <a class="el" href="namespace_lucene_1_1_net_1_1_documents.html">Documents</a> which should appear first in the sort should have low values, later documents high values.</p>
<p>String term values can contain any valid String, but should not be tokenized. The values are sorted according to their <a class="el" href="">natural order</a>. Note that using this type of term value has higher memory requirements than the other two types.</p>
<h3>Object Reuse</h3>
<p>One of these objects can be used multiple times and the sort order changed between usages.</p>
<p>This class is thread safe.</p>
<h3>Memory Usage</h3>
<p>Sorting uses of caches of term values maintained by the internal HitQueue(s). The cache is static and contains an integer or float array of length <code>IndexReader.MaxDoc</code> for each field name for which a sort is performed. In other words, the size of the cache in bytes is:</p>
<p><code>4 * IndexReader.MaxDoc * (# of different fields actually used to sort)</code></p>
<p>For String fields, the cache is larger: in addition to the above array, the value of every term in the field is kept in memory. If there are many unique terms in the field, this could be quite large.</p>
<p>Note that the size of the cache is not affected by how many fields are in the index and <em>might</em> be used to sort - only by the ones actually used to sort a result set.</p>
<p>Created: Feb 12, 2004 10:53:57 AM</p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00100">100</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a587d838350e158068bb3b42faf49fb9a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.Sort.Sort </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sorts by computed relevance. This is the same sort criteria as calling <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>without a sort criteria, only with slightly more overhead. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00120">120</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a603ce9031a175c80f10e6a1f3a2edc9c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.Sort.Sort </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a>&#160;</td>
<td class="paramname"><em>field</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sorts by the criteria in the given <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html" title="Stores information about how to sort documents by terms in an individual field. Fields must be indexe...">SortField</a>. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00125">125</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a239aee9c6be8f96aa26a87941c00aa80"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Lucene.Net.Search.Sort.Sort </td>
<td>(</td>
<td class="paramtype">params <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a>[]&#160;</td>
<td class="paramname"><em>fields</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sorts in succession by the criteria in each <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html" title="Stores information about how to sort documents by terms in an individual field. Fields must be indexe...">SortField</a>. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00131">131</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ae00f9ae265dabdbc008760ccf54b8356"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">override bool Lucene.Net.Search.Sort.Equals </td>
<td>(</td>
<td class="paramtype">System.Object&#160;</td>
<td class="paramname"><em>o</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if <code>o</code> is equal to this. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00171">171</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<a class="anchor" id="ac3155add53221e39860d8fadb41d5d6f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">override int Lucene.Net.Search.Sort.GetHashCode </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a hash code value for this object. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00202">202</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<a class="anchor" id="aa38cb1fce0ec08dc8b3453ec5a573191"></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_sort_field.html">SortField</a> [] Lucene.Net.Search.Sort.GetSort </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>Representation of the sort criteria.</p>
<dl class="section return"><dt>Returns</dt><dd>Array of <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html" title="Stores information about how to sort documents by terms in an individual field. Fields must be indexe...">SortField</a> objects used in this sort criteria </dd></dl>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00151">151</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<a class="anchor" id="ad9915d029ebb2b9ee789c364770ba675"></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.Sort.SetSort </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a>&#160;</td>
<td class="paramname"><em>field</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>Sets the sort to the given criteria. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00137">137</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<a class="anchor" id="aaaacc57f0346b140712d25bd138d36e7"></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.Sort.SetSort </td>
<td>(</td>
<td class="paramtype">params <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort_field.html">SortField</a>[]&#160;</td>
<td class="paramname"><em>fields</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>Sets the sort to the given criteria in succession. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00143">143</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a5e0f632c6a87afacc650788336769efa"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">override System.String Lucene.Net.Search.Sort.ToString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00156">156</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a378a01bda54bbfb4ba860a069c76de39"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">readonly <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a> Lucene.Net.Search.Sort.INDEXORDER</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Represents sorting by index order. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00111">111</a> of file <a class="el" href="_sort_8cs_source.html">Sort.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a520383543bbf07b1f3cfe95467d3d61b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">readonly <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a> Lucene.Net.Search.Sort.RELEVANCE = new <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_sort.html">Sort</a>()</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Represents sorting by computed relevance. Using this sort criteria returns the same results as calling <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>Searcher::search()without a sort criteria, only with slightly more overhead. </p>
<p>Definition at line <a class="el" href="_sort_8cs_source.html#l00108">108</a> of file <a class="el" href="_sort_8cs_source.html">Sort.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="_sort_8cs_source.html">Sort.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>