Last active
May 25, 2020 21:36
-
-
Save hunk/f12e635ec6900d5725ddfb9dbe143287 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 import Elasticsearch | |
es = Elasticsearch(ELASTICSEARCH_URL) | |
doc = { | |
'author': 'Patito', | |
'text': 'Some text here, more text.', | |
'timestamp': datetime.now(), | |
} | |
res = es.index(index="document-index", id=1, body=doc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment