Sort
PUT /my_index
{
"mappings": {
"my_type": {
"properties": {
"post_date": { "type": "date" },
"user": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"age": { "type": "integer" }
}
}
}
}GET /my_index/my_type/_search
{
"sort" : [
{ "post_date" : {"order" : "asc"}},
"user",
{ "name" : "desc" },
{ "age" : "desc" },
"_score"
],
"query" : {
"term" : { "user" : "kimchy" }
}
}排序值
排列顺序
排列模式选项
排序模式用法示例
使用内嵌对象排序
内嵌对象排序示例
缺失值
忽略没有映射的字段
GEO距离排序
属性格式的经纬度
字符串格式的经纬度
GeoHash
经纬度数组
多个引用点
基于脚本排序
追踪分数
内存注意事项
Last updated