lib/elasticsearch/api/actions/count.rb in elasticsearch-api-8.0.0.pre1 vs lib/elasticsearch/api/actions/count.rb in elasticsearch-api-8.0.0

- old
+ new

@@ -47,10 +47,15 @@ arguments = arguments.clone _index = arguments.delete(:index) - method = Elasticsearch::API::HTTP_POST + method = if body + Elasticsearch::API::HTTP_POST + else + Elasticsearch::API::HTTP_GET + end + path = if _index "#{Utils.__listify(_index)}/_count" else "_count" end