# What data are cached exactly in filter cache?

**URL:** <https://discuss.elastic.co/t/what-data-are-cached-exactly-in-filter-cache/20927>\
**Category:** Elasticsearch\
**Created:** [November 25, 2014, 1:39am UTC](https://discuss.elastic.co/t/what-data-are-cached-exactly-in-filter-cache/20927 "2014-11-25T01:39:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jinyuan\_Zhou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jinyuan_zhou/32/90185_2.png) [@Jinyuan\_Zhou](https://discuss.elastic.co/u/Jinyuan_Zhou)\
**Post date:** [November 25, 2014, 1:39am UTC](https://discuss.elastic.co/t/what-data-are-cached-exactly-in-filter-cache/20927/1 "2014-11-25T01:39:23Z")

</div>

is it the set of keys, e.g, the unique identifiers, which corresponds to  
exactly the set of documents that match the filter?  
Thanks,

--  
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/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [November 25, 2014, 2:09am UTC](https://discuss.elastic.co/t/what-data-are-cached-exactly-in-filter-cache/20927/2 "2014-11-25T02:09:39Z")

</div>

Its the set of documents that match the filter. Its cached per segment  
which are immutable so they can be effectively kept until the segment is  
removed or you run out of space in the cache. I believe the filter cache  
stores instances of Accountable  
[https://lucene.apache.org/core/4\_10\_0/core/org/apache/lucene/util/Accountable.html](https://lucene.apache.org/core/4_10_0/core/org/apache/lucene/util/Accountable.html)  
Bits  
[https://lucene.apache.org/core/4\_10\_0/core/org/apache/lucene/util/Bits.html](https://lucene.apache.org/core/4_10_0/core/org/apache/lucene/util/Bits.html)  
.

Nik

On Mon, Nov 24, 2014 at 8:39 PM, Jinyuan Zhou [zhou.jinyuan@gmail.com](mailto:zhou.jinyuan@gmail.com)  
wrote:

> is it the set of keys, e.g, the unique identifiers, which corresponds to  
> exactly the set of documents that match the filter?  
> Thanks,
> 
> --  
> 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/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAPmjWd1ym4%3D2hYvXS2O1Q9KoREAZi1qYr\_mk1uOgXoT0-NpCZQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd1ym4%3D2hYvXS2O1Q9KoREAZi1qYr_mk1uOgXoT0-NpCZQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jinyuan\_Zhou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jinyuan_zhou/32/90185_2.png) [@Jinyuan\_Zhou](https://discuss.elastic.co/u/Jinyuan_Zhou)\
**Post date:** [November 25, 2014, 2:55am UTC](https://discuss.elastic.co/t/what-data-are-cached-exactly-in-filter-cache/20927/3 "2014-11-25T02:55:53Z")

</div>

Thanks Nikolas,  
That's a lot of memory to use.

Jinyuan (Jack) Zhou

On Mon, Nov 24, 2014 at 6:09 PM, Nikolas Everett [nik9000@gmail.com](mailto:nik9000@gmail.com) wrote:

> Its the set of documents that match the filter. Its cached per segment  
> which are immutable so they can be effectively kept until the segment is  
> removed or you run out of space in the cache. I believe the filter cache  
> stores instances of Accountable  
> [https://lucene.apache.org/core/4\_10\_0/core/org/apache/lucene/util/Accountable.html](https://lucene.apache.org/core/4_10_0/core/org/apache/lucene/util/Accountable.html)  
> Bits  
> [https://lucene.apache.org/core/4\_10\_0/core/org/apache/lucene/util/Bits.html](https://lucene.apache.org/core/4_10_0/core/org/apache/lucene/util/Bits.html)  
> .
> 
> Nik
> 
> On Mon, Nov 24, 2014 at 8:39 PM, Jinyuan Zhou [zhou.jinyuan@gmail.com](mailto:zhou.jinyuan@gmail.com)  
> wrote:
> 
> > is it the set of keys, e.g, the unique identifiers, which corresponds to  
> > exactly the set of documents that match the filter?  
> > Thanks,
> > 
> > --  
> > 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/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/205d8e52-199c-4e47-afb2-c8582629b4d0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/wrd4U1oQQK8/unsubscribe](https://groups.google.com/d/topic/elasticsearch/wrd4U1oQQK8/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAPmjWd1ym4%3D2hYvXS2O1Q9KoREAZi1qYr\_mk1uOgXoT0-NpCZQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd1ym4%3D2hYvXS2O1Q9KoREAZi1qYr_mk1uOgXoT0-NpCZQ%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAPmjWd1ym4%3D2hYvXS2O1Q9KoREAZi1qYr\_mk1uOgXoT0-NpCZQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd1ym4%3D2hYvXS2O1Q9KoREAZi1qYr_mk1uOgXoT0-NpCZQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CANBTPCFL4%3D%3DfDkMgeZX6xWnUFCdx93ZhQC4LErpyyiaJeQ89\_w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANBTPCFL4%3D%3DfDkMgeZX6xWnUFCdx93ZhQC4LErpyyiaJeQ89_w%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, 12:47am UTC](https://discuss.elastic.co/t/what-data-are-cached-exactly-in-filter-cache/20927/4 "2017-07-06T00:47:53Z")

</div>


