# Cached terms lookup

**URL:** <https://discuss.elastic.co/t/cached-terms-lookup/90659>\
**Category:** Elasticsearch\
**Created:** [June 23, 2017, 3:07pm UTC](https://discuss.elastic.co/t/cached-terms-lookup/90659 "2017-06-23T15:07:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joris\_renkens](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@joris\_renkens](https://discuss.elastic.co/u/joris_renkens)\
**Post date:** [June 23, 2017, 3:07pm UTC](https://discuss.elastic.co/t/cached-terms-lookup/90659/1 "2017-06-23T15:07:50Z")

</div>

Hi,

I'm trying to execute a terms query with a lot of terms (several 100,000) and I'm using the terms lookup mechanism.

The same terms filter needs to be executed 1000+ times so it would be awesome if there was some way of caching the terms filter. Currently there is some caching going on (query time goes from 3s to 2.5s) but it seems to me that the speed gains could be a lot bigger if the entire terms filter was cached.

Kind Regards,  
Joris

---

<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 21, 2017, 3:08pm UTC](https://discuss.elastic.co/t/cached-terms-lookup/90659/2 "2017-07-21T15:08:01Z")

</div>

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