# Need Query Help

**URL:** https://discuss.elastic.co/t/need-query-help/23558
**Category:** Elasticsearch
**Created:** [May 5, 2015, 12:30pm UTC](https://discuss.elastic.co/t/need-query-help/23558 "2015-05-05T12:30:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ananth](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@ananth](https://discuss.elastic.co/u/ananth)
#### Post date: [May 5, 2015, 12:30pm UTC](https://discuss.elastic.co/t/need-query-help/23558/1 "2015-05-05T12:30:28Z")

</div>

Hi,

How to retrieve all the documents in which specified field has value ?

- 

field:[\* TO \*] matches all documents with the field (from solr wiki  
[http://wiki.apache.org/solr/SolrQuerySyntax](http://wiki.apache.org/solr/SolrQuerySyntax) )

Anantha Govindarajan.

--  
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/c621d69d-f463-4861-be99-e1cff0c224ba%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c621d69d-f463-4861-be99-e1cff0c224ba%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)
#### Post date: [May 6, 2015, 3:14pm UTC](https://discuss.elastic.co/t/need-query-help/23558/2 "2015-05-06T15:14:24Z")

</div>

hi  
i hope i understand your question.  
you should use exists filter:  
[http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-filter.html](http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-filter.html)

## -- Please update your bookmarks! We moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

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/a0f0f78f-2d02-4e13-81f9-f891aa30cc9e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a0f0f78f-2d02-4e13-81f9-f891aa30cc9e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:15am UTC](https://discuss.elastic.co/t/need-query-help/23558/3 "2017-07-06T00:15:22Z")

</div>


