# Plugin to expose FilterCache details

**URL:** <https://discuss.elastic.co/t/plugin-to-expose-filtercache-details/48761>\
**Category:** Elasticsearch\
**Created:** [April 29, 2016, 3:21am UTC](https://discuss.elastic.co/t/plugin-to-expose-filtercache-details/48761 "2016-04-29T03:21:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amre](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@amre](https://discuss.elastic.co/u/amre)\
**Post date:** [April 29, 2016, 3:21am UTC](https://discuss.elastic.co/t/plugin-to-expose-filtercache-details/48761/1 "2016-04-29T03:21:53Z")

</div>

Hi all,

I don't have a lot of experience with Elasticsearch, let alone with plugin development so I apologize in advance if the question is trivial or my approach is blatantly wrong.

I have been seeing a high number of evictions in a filter cache in one of my ES deployments (1.7). So I was trying to get as much information as possible to understand the nature of those evictions. However, it seems like there are only 2 useful metrics I can get from ES: # of evictions and cache size (please let me know if I've missed other metrics I should look at).

Hence, I've started looking at the available plugins and ultimately decided to build one that would help me to peak into a filter cache. For starters, I want to sample evicted filters, have metrics for the hits, # of documents per cached filter and etc.

Ideally, I would prefer to provide a custom FilterCacheFilterWrapper for WeightedFilterCache but it doesn't seem like it is possible. The closest I was able to get to was extending WeightedFilterCache and using it to bind FilterCache interface. However, I am not sure if it's the best approach since it requires passing an Index to WeightedFilterCache. I can get index from IndicesService but I hope there's a better approach as this seems too hacky.

Thanks!

---

<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 5, 2017, 10:55pm UTC](https://discuss.elastic.co/t/plugin-to-expose-filtercache-details/48761/2 "2017-07-05T22:55:22Z")

</div>


