# How to handle bulk data in "Terms Query"

**URL:** <https://discuss.elastic.co/t/how-to-handle-bulk-data-in-terms-query/183312>\
**Category:** Elasticsearch\
**Created:** [May 29, 2019, 11:07am UTC](https://discuss.elastic.co/t/how-to-handle-bulk-data-in-terms-query/183312 "2019-05-29T11:07:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balasubramani\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balasubramani_a/32/47059_2.png) [@Balasubramani\_A](https://discuss.elastic.co/u/Balasubramani_A)\
**Post date:** [May 29, 2019, 11:07am UTC](https://discuss.elastic.co/t/how-to-handle-bulk-data-in-terms-query/183312/1 "2019-05-29T11:07:32Z")

</div>

Hi,  
Need to check the list of 10000 ids available in my indexed doc? How to achieve that efficiently.  
**I am using java apis for elastic search**  
"query" : {  
"terms" : {  
"DestCountry" : ["US","IT"] // =\> **How to give lakhs of data here?**  
}  
}  
}  
}

---

<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:** [May 29, 2019, 11:21am UTC](https://discuss.elastic.co/t/how-to-handle-bulk-data-in-terms-query/183312/2 "2019-05-29T11:21:26Z")

</div>

I'm not sure that you can. You may have to split the query in smaller queries.  
Unsure though.

---

<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:** [June 26, 2019, 11:21am UTC](https://discuss.elastic.co/t/how-to-handle-bulk-data-in-terms-query/183312/3 "2019-06-26T11:21:27Z")

</div>

Closed on June 26, 2019, 11:21am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
