# Plsease explain me how cache works in ES

**URL:** <https://discuss.elastic.co/t/plsease-explain-me-how-cache-works-in-es/17475>\
**Category:** Elasticsearch\
**Created:** [May 13, 2014, 9:20am UTC](https://discuss.elastic.co/t/plsease-explain-me-how-cache-works-in-es/17475 "2014-05-13T09:20:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Ciurla](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Marcin\_Ciurla](https://discuss.elastic.co/u/Marcin_Ciurla)\
**Post date:** [May 13, 2014, 9:20am UTC](https://discuss.elastic.co/t/plsease-explain-me-how-cache-works-in-es/17475/1 "2014-05-13T09:20:21Z")

</div>

I got pretty simple question, but i can'f find and answer rly.

After i index document in ES it wil be commited to index in about 1 second.  
What will happen to my cache filled with filter query ealier. It will be  
cleared to give me most current response?

In solr when i index and commit new document new searcher is boarn and all  
cachech are cleared. How it look here?

--  
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/389eb7d5-b022-49d5-a345-600c635b15c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/389eb7d5-b022-49d5-a345-600c635b15c2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [May 14, 2014, 12:00pm UTC](https://discuss.elastic.co/t/plsease-explain-me-how-cache-works-in-es/17475/2 "2014-05-14T12:00:06Z")

</div>

Hi Marcin,

Elasticsearch caches filters per segment. Let's say that you have a search  
S and a filter F which is cached. If you perform updates, then a new  
searcher S2 will be created, that likely shares most of its segments with  
S. So on the next time that you will be using F in a query, Elasticsearch  
will only generate cache entries for the segments of S2 that were not part  
of S.

On Tue, May 13, 2014 at 11:20 AM, Marcin Ciurla [mizayah@gmail.com](mailto:mizayah@gmail.com) wrote:

> I got pretty simple question, but i can'f find and answer rly.
> 
> After i index document in ES it wil be commited to index in about 1 second.  
> What will happen to my cache filled with filter query ealier. It will be  
> cleared to give me most current response?
> 
> In solr when i index and commit new document new searcher is boarn and all  
> cachech are cleared. How it look here?
> 
> --  
> 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/389eb7d5-b022-49d5-a345-600c635b15c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/389eb7d5-b022-49d5-a345-600c635b15c2%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/389eb7d5-b022-49d5-a345-600c635b15c2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/389eb7d5-b022-49d5-a345-600c635b15c2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
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/CAL6Z4j644JR6NsY42gbm-qOJZ8nUoebeGouakP8isfoUaxJnNQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j644JR6NsY42gbm-qOJZ8nUoebeGouakP8isfoUaxJnNQ%40mail.gmail.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:29am UTC](https://discuss.elastic.co/t/plsease-explain-me-how-cache-works-in-es/17475/3 "2017-07-06T01:29:30Z")

</div>


