我目前正在使用Elasticsearch 1.3.4
通过Python ES客户端使用scroll API时(摘自this示例:
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
我得到了以下错误:
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]; ')
当在另一个elasticsearch(5.5.2)中使用相同的代码时,效果非常好
谷歌搜索让我找到了这个page,这表明ES版本<;=1.5中存在这个问题
我想知道是否有办法在不更新ES的情况下解决这个问题,或者我必须更新ES或者根本不使用Scroll
提前谢谢你
目前没有回答
相关问题 更多 >
编程相关推荐