# The new version of es "\_count" doesn't support post\_filter

**URL:** <https://discuss.elastic.co/t/the-new-version-of-es--count-doesnt-support-post-filter/91825>\
**Category:** Elasticsearch\
**Created:** [July 5, 2017, 3:05am UTC](https://discuss.elastic.co/t/the-new-version-of-es--count-doesnt-support-post-filter/91825 "2017-07-05T03:05:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 5, 2017, 9:02am UTC](https://discuss.elastic.co/t/the-new-version-of-es--count-doesnt-support-post-filter/91825/5 "2017-07-05T09:02:50Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). 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](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-count.html)

What has been removed is `search_type=count`: [Search and Query DSL changes | Elasticsearch Reference [5.4] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/breaking_50_search_changes.html#_literal_search_type_count_literal_removed)

I think it's perfectly to call `_search` with `size: 0`. It will behave like a count actually.

---

_[View the full topic](https://discuss.elastic.co/t/the-new-version-of-es--count-doesnt-support-post-filter/91825)._
