1、按日期查询索引文件:
# curl -u username:password -s -XGET 'http://192.168.1.100:9210/_cat/indices/*-2021.08.01?v'
2、查询某一索引文件的结构:
# curl -u username:password -s -XGET 'http://192.168.1.100:9210/operatelog-2021.08.01/_mapping?pretty'
3、查询某一索引文件的全部文档记录:
# curl -u username:password -s -XGET 'http://192.168.1.100:9210/operatelog-2021.08.01/_search?pretty'
4、按条件查询某一索引文件的文档记录:
# curl -u username:password -s -XGET 'http://192.168.1.100:9210/operatelog-2021.08.01/_search?q=_id:NsY9_3oBaOVv1BFhkWB8'
5、按条件查询某一索引文件的文档记录:
# curl -u username:password -H "Content-Type: application/json" -XGET 'http://192.168.1.100:9210/operatelog-2021.08.01/_search?pretty=true' -d '{ "query": { "match": { "_id": "NsY9_3oBaOVv1BFhkWB8" } } }'