Sending raw text as body is no longer supported, wrap scroll_id

This commit is contained in:
Honza Král
2017-02-08 20:51:13 +01:00
parent d862c8a799
commit a96f5f7284
+2 -2
View File
@@ -947,7 +947,7 @@ class Elasticsearch(object):
if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH:
raise ValueError("You need to supply scroll_id or body.")
elif scroll_id and not body:
body = scroll_id
body = {'scroll_id':scroll_id}
elif scroll_id:
params['scroll_id'] = scroll_id
@@ -968,7 +968,7 @@ class Elasticsearch(object):
if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH:
raise ValueError("You need to supply scroll_id or body.")
elif scroll_id and not body:
body = scroll_id
body = {'scroll_id':[scroll_id]}
elif scroll_id:
params['scroll_id'] = scroll_id