Added support for q parameter to delete_by_query

This commit is contained in:
Graeme Coupar
2013-10-30 12:47:53 +00:00
parent 04afc03cdd
commit 02b47b3f13
+2 -1
View File
@@ -538,7 +538,7 @@ class Elasticsearch(object):
params=params, body=self._bulk_body(body)) params=params, body=self._bulk_body(body))
return data return data
@query_params('consistency', 'ignore_indices', 'replication', 'routing', 'source', 'timeout') @query_params('consistency', 'ignore_indices', 'replication', 'routing', 'source', 'timeout', 'q')
def delete_by_query(self, index, doc_type=None, body=None, params=None): def delete_by_query(self, index, doc_type=None, body=None, params=None):
""" """
Delete documents from one or more indices and one or more types based on a query. Delete documents from one or more indices and one or more types based on a query.
@@ -553,6 +553,7 @@ class Elasticsearch(object):
:arg replication: Specific replication type (default: sync) :arg replication: Specific replication type (default: sync)
:arg routing: Specific routing value :arg routing: Specific routing value
:arg source: The URL-encoded query definition (instead of using the request body) :arg source: The URL-encoded query definition (instead of using the request body)
:arg q: Query in the Lucene query string syntax
:arg timeout: Explicit operation timeout :arg timeout: Explicit operation timeout
""" """
_, data = self.transport.perform_request('DELETE', _make_path(index, doc_type, '_query'), _, data = self.transport.perform_request('DELETE', _make_path(index, doc_type, '_query'),