# Unexpected fielddata cache usage

**URL:** https://discuss.elastic.co/t/unexpected-fielddata-cache-usage/53731
**Category:** Elasticsearch
**Created:** [June 23, 2016, 5:35am UTC](https://discuss.elastic.co/t/unexpected-fielddata-cache-usage/53731 "2016-06-23T05:35:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![edvorg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edvorg/32/9514_2.png) [@edvorg](https://discuss.elastic.co/u/edvorg)
#### Post date: [June 23, 2016, 5:35am UTC](https://discuss.elastic.co/t/unexpected-fielddata-cache-usage/53731/1 "2016-06-23T05:35:19Z")

</div>

I have several indexes pointing to same alias. Each index has different type of documents stored in it. I do a query that sorts documents of some type by \_uid. When doing this query I noticed that it takes a lot of memory in field data cache. I expect this query to only fill cache with data of indexes with matching type. Instead it seems it fills cache with data from all indexes. Could someone explain why is it happening?

---

<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:41pm UTC](https://discuss.elastic.co/t/unexpected-fielddata-cache-usage/53731/2 "2017-07-05T22:41:14Z")

</div>


