make Elasticsearch.scroll POST the scroll ID

Without this, if you have a large number of indices the `scroll_id` will be very long, and ElasticSearch will return an invalid response. (A urllib3 `ConnectionError` to be precise.) This changes the behavior to POST to the scroll endpoint, which gets around the URL length restriction.
This commit is contained in:
Brian Hicks
2013-12-16 16:33:32 +01:00
committed by Honza Král
parent 05c4eefbf3
commit 6f7349eec4
+2 -2
View File
@@ -441,8 +441,8 @@ class Elasticsearch(object):
:arg scroll: Specify how long a consistent view of the index should be
maintained for scrolled search
"""
_, data = self.transport.perform_request('GET', _make_path('_search', 'scroll', scroll_id),
params=params)
_, data = self.transport.perform_request('POST', _make_path('_search', 'scroll'),
params=params, body=scroll_id)
return data
@query_params()