Created
January 20, 2019 14:28
-
-
Save Linusp/09bf5b4df9040d84eded271c36c2c1e9 to your computer and use it in GitHub Desktop.
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 import Elasticsearch | |
from elasticsearch.helpers import scan | |
index = 'some-index' | |
doctype = 'some-doctype' | |
client = Elasticsearch(hosts=['localhost:9200']) | |
for item in scan(client, index=index, doc_type=doctype, preserve_order=True): | |
print(item['_source']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment