How to include `search_type=count` in a query?
The general consensus is to not use search_type=count
anymore as it's been deprecated in 2.0. Instead you should simply use size: 0
.
res = client.search(index = "indexname*", doc_type = "doc_type", body = q, size=0)
^
|
add this