From 02b47b3f1342ebcc4f0724d7168d33d9279559a4 Mon Sep 17 00:00:00 2001 From: Graeme Coupar Date: Wed, 30 Oct 2013 12:47:53 +0000 Subject: [PATCH] Added support for q parameter to delete_by_query --- elasticsearch/client/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index 64b13296..c7b333e1 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -538,7 +538,7 @@ class Elasticsearch(object): params=params, body=self._bulk_body(body)) 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): """ 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 routing: Specific routing value :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 """ _, data = self.transport.perform_request('DELETE', _make_path(index, doc_type, '_query'),