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. |
field | Name of field to sort by. Can be |
System. |
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. |
field | Name of field to sort by. Can be |
System. |
type | Type of values in the terms. |
System. |
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. |
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 Field |
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. |
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 Field |
System. |
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. |
field | Name of field to sort by, cannot be |
System. |
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. |
field | Name of field to sort by, cannot be |
System. |
locale | Locale of values in the field. |
System. |
reverse |
SortField(String, FieldComparatorSource)
Creates a sort with a custom comparison function.
Declaration
public SortField(String field, FieldComparatorSource comparator)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | Name of field to sort by; cannot be |
Field |
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. |
field | Name of field to sort by; cannot be |
Field |
comparator | Returns a comparator for sorting hits. |
System. |
reverse | True if natural order should be reversed. |