Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def get_all():
doc_index = search.Index(API_ITEMS_INDEX_NAME)
firstBatch = doc_index.get_range(start_id=None, limit=1000).results
results = firstBatch
while True:
batch = doc_index.get_range(results[-1].doc_id,1000)
if len(batch.results) == 1:
break
else:
results = results + batch.results
return results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.