一般我们都是用可视化界面或者类似kibbana工具可以自动编辑es查询条件。
如果用linux命令来查询,其实就是转换成http请求,用curl来请求
#查询所有索引名称
curl -XGET "http://es集群ip地址:9200/_cat/indices?v"
#查询某个索引下文档
curl -XPOST "http://es集群ip地址:9200/索引名/_search" -H 'Content-Type: application/json' -d'{ "query": { "bool": { "must": [ { "bool": { "must": [ { "term": { "firmId": { "value": "2020111015185184" } } } ] } } ] } },"sort": [ { "createTime": { "order": "asc" } } ]}'