Created
August 4, 2014 07:16
-
-
Save drorata/ef9c0d2012bfc630b565 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
sid=res['_scroll_id'] | |
IDs=[] | |
scroll_size=res['hits']['total'] | |
while (scroll_size > 0): | |
sys.stdout.write('.') | |
sys.stdout.flush() | |
try: | |
res=es.scroll(scroll_id=sid,scroll='1m') | |
IDs += res['hits']['hits'] | |
sid=res['_scroll_id'] | |
scroll_size=len(res['hits']['hits']) | |
except: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment