Please format your code using </>
icon as explained in this guide. It will make your post more readable.
Or use markdown style like:
```
CODE
```
I just want the count, But now, I have to use _search to get the count.
Hmm. Sounds like I was wrong. _count
API still exists: Count API | Elasticsearch Reference [5.4] | Elastic
What has been removed is search_type=count
: Search and Query DSL changes | Elasticsearch Reference [5.4] | Elastic
I think it's perfectly to call _search
with size: 0
. It will behave like a count actually.