How to get a list of all indexes in python-elasticsearch

后端 未结 7 2075
北海茫月
北海茫月 2021-02-06 20:32

How would I get a list of the names of an index in Python? Here is what I have so far:

>>> es=e.es
>>> es


        
7条回答
  •  感动是毒
    2021-02-06 21:07

    how to get a list of all indexes in this cluster?

    Use the wildcard. Works with elasticsearch-py.

    for index in es.indices.get('*'):
      print index
    

提交回复
热议问题