From e42820ffee70546ba9ebf147f4bfe6240c2d8052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Thu, 16 Jan 2014 14:38:26 +0100 Subject: [PATCH] Add 'q' parameter to count() method. Fixes #33 --- 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 b3c0700e..88773d24 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -481,7 +481,7 @@ class Elasticsearch(object): _, data = self.transport.perform_request('DELETE', _make_path(index, doc_type, id), params=params) return data - @query_params('ignore_indices', 'min_score', 'preference', 'routing', 'source') + @query_params('ignore_indices', 'min_score', 'preference', 'q', 'routing', 'source') def count(self, index=None, doc_type=None, body=None, params=None): """ Execute a query and get the number of matches for that query. @@ -495,6 +495,7 @@ class Elasticsearch(object): :arg min_score: Include only documents with a specific `_score` value in the result :arg preference: Specify the node or shard the operation should be performed on (default: random) + :arg q: Query in the Lucene query string syntax :arg routing: Specific routing value :arg source: The URL-encoded query definition (instead of using the request body) """