// es 查询指定 aid 的 一篇文章
curl -XPOST '192.168.0.2:9200/ass_cqmzvcn_all/_search?pretty' -d '
{
"query": { "match": {"aid":"9CaKrnK6RoU"} },
"size": 1
}' --header 'Content-Type: application/json'
// es 使用 SQL 查询 结果
curl -X POST "localhost:9200/_xpack/sql?format=txt" -H 'Content-Type: application/json' -d'
{
"query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5"
}'
// es 使用 SQL GET 查询 结果
curl '192.168.0.2:9200/ass_cqmzvcn_all/_sql?sql=SELECT%20%23%20FROM%20idx%20where%20state%3D5%20and%20aid%20IN%20('9CaKrnJk0tQ'%2C'9CaKrnK6RoU'%2C'9CaKrnK6PhE'%2C'9CaKrnK6P8O'%2C'9CaKrnK6U41'%2C'9CaKrnK6Rr5')%20ORDER%20BY%20ctime%20DESC%20LIMIT%200%2C%205'