Class Sorting
Options to control sort order
Inheritance
Inherited Members
Namespace: Textkernel.Tx.Models.API.MatchV2.Request
Assembly: Textkernel.Tx.SDK.dll
Syntax
public class Sorting
Properties
| Improve this Doc View SourceField
The field name. Two special "fields" exist: _reranker and _score. _score means sorting by the engine score, _reranker means sorting by reranker score. For sorting with type _reranker a reranker needs to be configured. A sorting on field _reranker cannot have subsortings on other fields and cannot have a custom order.
Declaration
public string Field { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Order
Optional order of the sorting. The default behavior depends on the data type of the field: DESCENDING for numeric and date types, ASCENDING for other types. For fields with location data type, results will be sorted according to the distance to the referenceLocation and only ASCENDING is supported.
Declaration
public SortOrder? Order { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<SortOrder> |
ReferenceLocation
Optional (required for fields with location data type specified) String representation of a location point in the form of "LATITUDE LONGITUDE" (e.g. "53.3478 -6.2597"). This is used for distance sorting on a location field.
Declaration
public string ReferenceLocation { get; set; }
Property Value
Type | Description |
---|---|
System.String |