文档地址:https://elasticsearch-py.readthedocs.io/en/v8.0.1/api.html#cat
返回 Json 格式的查询一个索引的通配的样例:
from elasticsearch import Elasticsearch
es_host = "localhost:19200"
es_client = Elasticsearch(es_host)
es_client.cat.indices(index="index_name*", format="json")
返回 Json 格式的查询多个索引的通配的样例:
from elasticsearch import Elasticsearch
es_host = "localhost:19200"
es_client = Elasticsearch(es_host)
es_client.cat.indices(index=["index_name1*", "index_name2*"], format="json")