public static class CloudSearch.Sortingrules
extends java.lang.Object
只支持按一个字段排序,支持的排序字段如下:
1、支持按建立了索引的整数或小数字段进行排序(请在数据管理台中管理排序筛选索引)
sortrule=字段名:asc (升序)
sortrule=字段名:desc (降序)
示例:按年龄age字段升序排序
sortrule=age:asc
2、支持按系统预设的 (仅圆形搜索支持)
_distance:坐标与中心点距离排序(仅支持升序sortrule=_distance:asc);
Only one field can be used for sorting. The supported sorting fields are as follows:
1. Sorting by indexed integer or decimal fields (please manage the sorting filter index in the data management console)
sortrule=field_name:asc (ascending)
sortrule=field_name:desc (descending)
Example: Sort by the age field in ascending order
sortrule=age:asc
2. Sorting by system presets (only supported for circular searches)
_distance: Sort by distance from the center point (only supports ascending order sortrule=_distance:asc);
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DISTANCE
距离排序
Distance sorting |
static int |
WEIGHT
权重排序
Weight sorting |
| 构造器和说明 |
|---|
Sortingrules(int type)
根据给定的参数确定 Sortingrules 对象
仅支持圆形范围查询
Determine the Sortingrules object based on the given parameters. |
Sortingrules(java.lang.String key,
boolean isAscending)
根据给定的参数构造一个 Sortingrules 新对象
Construct a new Sortingrules object based on the given parameters. |
public static final int WEIGHT
public static final int DISTANCE
public Sortingrules(java.lang.String key,
boolean isAscending)
key - 排序索引的key。
isAscending - 是否按升序排列返回。true 为升序,false为降序。
public Sortingrules(int type)
type - 企业地图系统预设排序,无需建索引:0为权重降序排列,1为距离升序排列。如果查询范围不是圆形,则没有距离排序。如果查询范围是圆形,
有关键字时默认为权重降序排列,无关键字时默认为距离升序排列。 public java.lang.String toString()
toString 在类中 java.lang.Objectpublic int hashCode()
hashCode 在类中 java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals 在类中 java.lang.Objectobj - 查询条件