Make count consistent with search

This commit is contained in:
Honza Král
2015-04-07 10:27:20 +02:00
parent 453fe64987
commit 881438de7c
+3
View File
@@ -681,6 +681,9 @@ class Elasticsearch(object):
:arg routing: Specific routing value
:arg source: The URL-encoded query definition (instead of using the request body)
"""
if doc_type and not index:
index = '_all'
_, data = self.transport.perform_request('POST', _make_path(index, doc_type, '_count'),
params=params, body=body)
return data