Class SortField
Stores information about how to sort documents by terms in an individual field. Fields must be indexed in order to sort by them.
Created: Feb 11, 2004 1:25:29 PM
@since lucene 1.4
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public class SortField : object
Constructors
Name | Description |
---|---|
SortField(String, FieldCache.IParser) | Creates a sort by terms in the given field, parsed to numeric values using a custom FieldCache.IParser. |
SortField(String, FieldCache.IParser, Boolean) | Creates a sort, possibly in reverse, by terms in the given field, parsed to numeric values using a custom FieldCache.IParser. |
SortField(String, FieldComparerSource) | Creates a sort with a custom comparison function. |
SortField(String, FieldComparerSource, Boolean) | Creates a sort, possibly in reverse, with a custom comparison function. |
SortField(String, SortFieldType) | Creates a sort by terms in the given field with the type of term values explicitly given. |
SortField(String, SortFieldType, Boolean) | Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given. |
Fields
Name | Description |
---|---|
FIELD_DOC | Represents sorting by document number (index order). |
FIELD_SCORE | Represents sorting by document score (relevance). |
m_missingValue | |
STRING_FIRST | Pass this to MissingValue to have missing string values sort first. |
STRING_LAST | Pass this to MissingValue to have missing string values sort last. |
Properties
Name | Description |
---|---|
BytesComparer | |
ComparerSource | Returns the FieldComparerSource used for custom sorting. |
Field | Returns the name of the field. Could return |
IsReverse | Returns whether the sort should be reversed. |
MissingValue | |
NeedsScores | Whether the relevance score is needed to sort documents. |
Parser | Returns the instance of a IFieldCache parser that fits to the given sort type.
May return |
Type | Returns the type of contents in the field. |
Methods
Name | Description |
---|---|
Equals(Object) | Returns |
GetComparer(Int32, Int32) | Returns the FieldComparer to use for sorting. @lucene.experimental |
GetHashCode() | Returns a hash code value for this object. If a FieldComparerSource or FieldCache.IParser was provided, it must properly implement GetHashCode() (unless a singleton is always used). |
Rewrite(IndexSearcher) | Rewrites this SortField, returning a new SortField if a change is made. Subclasses should override this define their rewriting behavior when this SortField is of type REWRITEABLE. @lucene.experimental |
ToString() |