Add clear_scroll API

This commit is contained in:
Honza Kral
2013-09-25 14:02:04 +02:00
parent d7814d09f7
commit 48c2b1bcf0
+14
View File
@@ -365,6 +365,20 @@ class Elasticsearch(object):
params=params)
return data
@query_params()
def clear_scroll(self, scroll_id, params=None):
"""
Clear the scroll request created by specifying the scroll parameter to
search.
`<http://www.elasticsearch.org/guide/reference/api/search/scroll/>`_
:arg scroll_id: The scroll ID or a list of scroll IDs
"""
_, data = self.transport.perform_request('DELETE', _make_path('_search', 'scroll', scroll_id),
params=params)
return data
@query_params('consistency', 'parent', 'refresh', 'replication', 'routing',
'timeout', 'version', 'version_type')
def delete(self, index, doc_type, id, ignore=(), params=None):