Sorter
Updated at:
Sorter specifies the sorting method of the index. You can specify one of the four sorting methods. By default, search indexes that do not contain Nested fields are sorted by PrimaryKeySort, and search indexes that contain Nested fields are not sorted.
Data structure
message Sorter {
optional FieldSort field_sort = 1;
optional GeoDistanceSort geo_distance_sort = 2;
optional ScoreSort score_sort = 3;
optional PrimaryKeySort pk_sort = 4;
}
|
Parameter |
Type |
Required |
Description |
|
field_sort |
No |
Specifies sorting based on field values. |
|
|
geo_distance_sort |
No |
Specifies sorting based on geographic locations. |
|
|
score_sort |
No |
Specifies sorting based on the BM25-based keyword relevance score. |
|
|
pk_sort |
No |
Specifies sorting based on the primary key. |
Is this page helpful?