Custom Search

Sunday, November 4, 2018

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

sudo pip install elasticsearch

from elasticsearch import Elasticsearch
HOST_URLS = ["http://127.0.0.1:9200"]
es_conn = Elasticsearch(HOST_URLS)
es_conn.indices.get_alias()
es_conn.indices.get_mapping().keys()

http://127.0.0.1:9200/_alias
http://127.0.0.1:9200/_mapping


No comments:

Post a Comment