Last active
December 28, 2019 17:42
-
-
Save kartikpuri95/48102892bcb9b18c436ceaa8dc6bd57b to your computer and use it in GitHub Desktop.
elasticsearch connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from elasticsearch_dsl import connections | |
from elasticsearch import Elasticsearch | |
connections.create_connection(hosts=['127.0.0.1'], timeout=20) #create connection our host | |
es=Elasticsearch() #initialize the elasticsearch object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment