Skip to content

Instantly share code, notes, and snippets.

@toravir
toravir / helloEs.py
Created April 4, 2020 03:03
Python Client For Elasticsearch
from elasticsearch import Elasticsearch
indexName='tstidx1'
es = Elasticsearch([{'host':'sprint.cisco.com', 'port':9200}])
es.info()
indexBody= {
"settings" : {
"number_of_shards": 1,
"number_of_replicas" : 0