I'm currently using Elasticsearch 1.3.4.
When using the scroll API via the Python ES Client (taken from this example:
page = es.search(
index = INDEX_NAME,
scroll = '1m',
size = 1000,
body={"query": {"match_all": {}}})
sid = page['_scroll_id']
scroll_size = page['hits']['total']
# Start scrolling
print( "Scrolling...")
while (scroll_size > 0):
print("Page: ",count)
page = es.scroll(scroll_id = sid, scroll = '10m')
# Update the scroll ID
sid = page['_scroll_id']
for hit in page['hits']['hits']:
#some code processing here
I got the following error:
elasticsearch.exceptions.RequestError: RequestError(400, 'ElasticsearchIllegalArgumentException[Failed to decode scrollId]; nested: IOException[Bad Base64 input character decimal 123 in array position 0]; ', 'ElasticsearchIllegalArgumentException[Failed to decode scrollId]; nested: IOException[Bad Base64 input character decimal 123 in array position 0]; ')
The same code, when used in another elasticsearch (5.5.2), works perfectly.
Googling led me to this page, which suggested the issue existed in ES version <= 1.5.
I'm wondering if is there a way to fix this issue without updating ES, or I either have to update ES or not use Scroll at all?
Thank you in advance!