Table of Contents

Class Sorting

Namespace
Textkernel.Tx.Models.API.MatchV2.Request
Assembly
Textkernel.Tx.SDK.dll

Options to control sort order

public class Sorting
Inheritance
Sorting
Inherited Members

Properties

Field

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.

public string Field { get; set; }

Property Value

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.

public SortOrder? Order { get; set; }

Property Value

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.

public string ReferenceLocation { get; set; }

Property Value

string