根据年龄降序排序
#排序
GET /lib3/user/_search
{
"query": {
"match_all": {}
},
"sort":[
{"age": {"order" :"desc"}}
]
}
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 5,
"max_score" : null,
"hits" : [
{
"_index" : "lib3",
"_type" : "user",
"_id" : "1",
"_score" : null,
"_source" : {
"name" : "zhaoliu",
"address" : "hei long jiang sheng tie ling shi",
"age" : 50,
"birthday" : "1970-12-12",
"interests" : "xi buan hejiu, duanlian, lvyou"
},
&#