# Setting field data cache for query performance

**URL:** <https://discuss.elastic.co/t/setting-field-data-cache-for-query-performance/169365>\
**Category:** Elasticsearch\
**Created:** [February 21, 2019, 9:56am UTC](https://discuss.elastic.co/t/setting-field-data-cache-for-query-performance/169365 "2019-02-21T09:56:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rosmi](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@Rosmi](https://discuss.elastic.co/u/Rosmi)\
**Post date:** [February 21, 2019, 9:56am UTC](https://discuss.elastic.co/t/setting-field-data-cache-for-query-performance/169365/1 "2019-02-21T09:56:00Z")

</div>

One of the elasticsearch search query with aggregation, is taking more than 10s and getting timed out in my application. The data set being aggregated is very huge .As part of tuning the search query,I am trying to set indices.fielddata.cache.size, The API call returned error,  
**"error":{"root\_cause":[{"type":"illegal\_argument\_exception","reason":"persistent setting [indices.fielddata.cache.size], not dynamically updateable"}],"type":"illegal\_argument\_exception","reason":"persistent setting [indices.fielddata.cache.size], not dynamically updateable"},"status":400}**

So, tried setting this field in elasticsearch.yml and restarted as,  
indices.fielddata.cache.size : 50%  
How do I check if this got set correctly? curl [http://localhost:9200/\_cluster/stats](http://localhost:9200/_cluster/stats) is just giving  
**"fielddata": {**  
\*\* "memory\_size\_in\_bytes": 0,\*\*  
\*\* "evictions": 0\*\*  
\*\* }\*\*

Please help.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 21, 2019, 10:09am UTC](https://discuss.elastic.co/t/setting-field-data-cache-for-query-performance/169365/2 "2019-02-21T10:09:24Z")

</div>

I wonder if you can get this from [https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html) ?

---

<div class="post-metadata">

**Author:** ![Rosmi](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@Rosmi](https://discuss.elastic.co/u/Rosmi)\
**Post date:** [February 21, 2019, 10:13am UTC](https://discuss.elastic.co/t/setting-field-data-cache-for-query-performance/169365/3 "2019-02-21T10:13:53Z")

</div>

\_nodes/stats also returns  
"fielddata": {  
"memory\_size\_in\_bytes": 0,  
"evictions": 0  
}  
This is not returning the value set in elasticsearch.yml file.

---

<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:** [March 21, 2019, 10:13am UTC](https://discuss.elastic.co/t/setting-field-data-cache-for-query-performance/169365/4 "2019-03-21T10:13:55Z")

</div>

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