参考:https://es.xiaoleilu.com/056_Sorting/85_Sorting.html
//倒序-排序返回指定数据
【POST】
curl -XGET -u elastic:changeme "http://100.10.12.21:9200/t-2018-09-19/_search?pretty" -H 'Content-Type: application/json' -d'
{
"query": {
"term": {
"machine": {
"value": "192.168.76.126"
}
}
},
"sort": [
{
"time": {
"order": "desc"
}
}
]
}'|more
【GET】
curl -XGET "http://100.10.12.21:9200/t-2018-09-19/_search?q=machine:192.168.76.126&sort=time:desc" -u elastic:changeme
没有评论:
发表评论