# Terms Query OR Terms Filter with Match All

**URL:** <https://discuss.elastic.co/t/terms-query-or-terms-filter-with-match-all/19679>\
**Category:** Elasticsearch\
**Created:** [September 9, 2014, 12:31pm UTC](https://discuss.elastic.co/t/terms-query-or-terms-filter-with-match-all/19679 "2014-09-09T12:31:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [September 9, 2014, 12:31pm UTC](https://discuss.elastic.co/t/terms-query-or-terms-filter-with-match-all/19679/1 "2014-09-09T12:31:14Z")

</div>

Hi,

I have a list of terms (type:string), and I want to retrieve all documents  
that have those terms. The term field is like a unique incremental sequence  
field.

Which would be more performant? A Terms Query OR a Terms Filter with a  
Match All. Or some totally other approach ....

Thanks,  
Sandeep

--  
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/ee1460b3-3eab-4578-bd09-318c0779f918%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ee1460b3-3eab-4578-bd09-318c0779f918%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, 1:03am UTC](https://discuss.elastic.co/t/terms-query-or-terms-filter-with-match-all/19679/2 "2017-07-06T01:03:44Z")

</div>


