"如何获取elasticsearch中所有索引的列表?"

Published on Aug. 22, 2023, 12:05 p.m.

Pyhon中遍历elasticsearch索引表

<h1>使用通配符。适用于elasticsearch。</h1>
from elasticsearch import Elasticsearch
es = Elasticsearch('127.0.0.1:9200')
for index in es.indices.get('*'):
  print(index)


Tags: