sort字段指定排序,倒序:"sort": { "tftxtime": { "order": "desc" }}
查询条件格式如下:
{
"query": {
"bool": {
"must": [],
"must_not": [{
"term": {
"flow_yh_yh_location": ""
}
},
{
"term": {
"routemcc": "1111"
}
},
{
"term": {
"routemcc": "2222"
}
}
],
"should": [{
"match_all": {}
}]
}
},
"from": 0,
"size": 10,
"sort": {
"tftxtime": {
"order": "desc"
}
},
"aggs": {}
}
json压缩后:
{"query":{"bool":{"must":[],"must_not":[{"term":{"flow_yh_yh_location":""}},{"term":{"routemcc":"1111"}},{"term":{"routemcc":"2222"}}],"should":[{"match_all":{}}]}},"from":0,"size":10,"sort":{"tftxtime":{"order":"desc"}},"aggs":{}}