# Use doc\_count in query syntax?

**URL:** <https://discuss.elastic.co/t/use-doc-count-in-query-syntax/15173>\
**Category:** Elasticsearch\
**Created:** [January 9, 2014, 12:35pm UTC](https://discuss.elastic.co/t/use-doc-count-in-query-syntax/15173 "2014-01-09T12:35:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhiage](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abhiage](https://discuss.elastic.co/u/abhiage)\
**Post date:** [January 9, 2014, 12:35pm UTC](https://discuss.elastic.co/t/use-doc-count-in-query-syntax/15173/1 "2014-01-09T12:35:10Z")

</div>

Can I use doc\_count of facet/aggregation query in other query syntax?  
I want perform some conditions on doc\_count. Based on output of conditions  
result will be displayed.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ee7725a5-7eb2-47b5-93a3-88e3e1f820d3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ee7725a5-7eb2-47b5-93a3-88e3e1f820d3%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 14, 2014, 11:16am UTC](https://discuss.elastic.co/t/use-doc-count-in-query-syntax/15173/2 "2014-01-14T11:16:07Z")

</div>

Hey,

this sounds more like a client side issue, than it makes sense to do on the  
elasticsearch side. Maybe you can elaborate a bit, what you actually want  
to do.

The doc\_count itself is just a field and cannot be used to display or hide  
information being returned in a query (if thats what you want to do).

--Alex

On Thu, Jan 9, 2014 at 1:35 PM, abhi patel [abhiage@gmail.com](mailto:abhiage@gmail.com) wrote:

> Can I use doc\_count of facet/aggregation query in other query syntax?  
> I want perform some conditions on doc\_count. Based on output of conditions  
> result will be displayed.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/ee7725a5-7eb2-47b5-93a3-88e3e1f820d3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ee7725a5-7eb2-47b5-93a3-88e3e1f820d3%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM82siLecrOMaFOCSTBZf4M7\_VZKuOBCrrwcQ\_GMz6jPuQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM82siLecrOMaFOCSTBZf4M7_VZKuOBCrrwcQ_GMz6jPuQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:56am UTC](https://discuss.elastic.co/t/use-doc-count-in-query-syntax/15173/3 "2017-07-06T01:56:57Z")

</div>

Closed on July 6, 2017, 1:56am UTC


