Skip to content

Commit 3e4e6ba

Browse files
committed
use GET method for count
as documented in the Elasticsearch API reference
1 parent edbf7ec commit 3e4e6ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch/client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ def count(self, index=None, doc_type=None, body=None, params=None):
741741
if doc_type and not index:
742742
index = '_all'
743743

744-
_, data = self.transport.perform_request('POST', _make_path(index,
744+
_, data = self.transport.perform_request('GET', _make_path(index,
745745
doc_type, '_count'), params=params, body=body)
746746
return data
747747

0 commit comments

Comments
 (0)