Scan bug that caused the scan to be sorted

This commit is contained in:
Honza Král
2016-11-02 19:29:41 +01:00
parent 9c2af0f77c
commit 5fe3b4baf8
+2 -2
View File
@@ -276,8 +276,8 @@ def scan(client, query=None, scroll='5m', raise_on_error=True,
""" """
if not preserve_order: if not preserve_order:
body = query.copy() if query else {} query = query.copy() if query else {}
body["sort"] = "_doc" query["sort"] = "_doc"
# initial search # initial search
resp = client.search(body=query, scroll=scroll, size=size, resp = client.search(body=query, scroll=scroll, size=size,
request_timeout=request_timeout, **kwargs) request_timeout=request_timeout, **kwargs)