Constructor SortField
SortField(String, Int32)
Creates a sort by terms in the given field with the type of term values explicitly given.
Declaration
public SortField(String field, int type)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of field to sort by. Can be |
System.Int32 | type | Type of values in the terms. |
SortField(String, Int32, Boolean)
Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given.
Declaration
public SortField(String field, int type, bool reverse)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of field to sort by. Can be |
System.Int32 | type | Type of values in the terms. |
System.Boolean | reverse | True if natural order should be reversed. |
SortField(String, Parser)
Creates a sort by terms in the given field, parsed to numeric values using a custom Parser.
Declaration
public SortField(String field, Parser parser)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of field to sort by. Must not be null. |
Parser | parser | Instance of a Parser, which must subclass one of the existing numeric parsers from FieldCache. Sort type is inferred by testing which numeric parser the parser subclasses. |
SortField(String, Parser, Boolean)
Creates a sort, possibly in reverse, by terms in the given field, parsed to numeric values using a custom Parser.
Declaration
public SortField(String field, Parser parser, bool reverse)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of field to sort by. Must not be null. |
Parser | parser | Instance of a Parser, which must subclass one of the existing numeric parsers from FieldCache. Sort type is inferred by testing which numeric parser the parser subclasses. |
System.Boolean | reverse | True if natural order should be reversed. |
SortField(String, Globalization.CultureInfo)
Creates a sort by terms in the given field sorted according to the given locale.
Declaration
public SortField(String field, Globalization.CultureInfo locale)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of field to sort by, cannot be |
System.Globalization.CultureInfo | locale | Locale of values in the field. |
SortField(String, Globalization.CultureInfo, Boolean)
Creates a sort, possibly in reverse, by terms in the given field sorted according to the given locale.
Declaration
public SortField(String field, Globalization.CultureInfo locale, bool reverse)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of field to sort by, cannot be |
System.Globalization.CultureInfo | locale | Locale of values in the field. |
System.Boolean | reverse |
SortField(String, FieldComparatorSource)
Creates a sort with a custom comparison function.
Declaration
public SortField(String field, FieldComparatorSource comparator)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of field to sort by; cannot be |
FieldComparatorSource | comparator | Returns a comparator for sorting hits. |
SortField(String, FieldComparatorSource, Boolean)
Creates a sort, possibly in reverse, with a custom comparison function.
Declaration
public SortField(String field, FieldComparatorSource comparator, bool reverse)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | Name of field to sort by; cannot be |
FieldComparatorSource | comparator | Returns a comparator for sorting hits. |
System.Boolean | reverse | True if natural order should be reversed. |