From 3e4e6ba43072950061bdeb45c5e4b8d3bfff1b0e Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 10 Sep 2015 15:54:56 +0200 Subject: [PATCH] use GET method for count as documented in the Elasticsearch API reference --- elasticsearch/client/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index 0efc9dc8..38f22465 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -741,7 +741,7 @@ class Elasticsearch(object): if doc_type and not index: index = '_all' - _, data = self.transport.perform_request('POST', _make_path(index, + _, data = self.transport.perform_request('GET', _make_path(index, doc_type, '_count'), params=params, body=body) return data