# Change index.cache.field.type on live index

**URL:** <https://discuss.elastic.co/t/change-index-cache-field-type-on-live-index/10039>\
**Category:** Elasticsearch\
**Created:** [December 11, 2012, 2:03pm UTC](https://discuss.elastic.co/t/change-index-cache-field-type-on-live-index/10039 "2012-12-11T14:03:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bohemer\_2](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@bohemer\_2](https://discuss.elastic.co/u/bohemer_2)\
**Post date:** [December 11, 2012, 2:03pm UTC](https://discuss.elastic.co/t/change-index-cache-field-type-on-live-index/10039/1 "2012-12-11T14:03:50Z")

</div>

I have a large index with around 70M documents and in the mapping is  
specified that the index cache type is soft. Is there a way to change to  
index.cache.field.type setting from soft to resident without to reindex the  
index?

--

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [December 11, 2012, 2:16pm UTC](https://discuss.elastic.co/t/change-index-cache-field-type-on-live-index/10039/2 "2012-12-11T14:16:06Z")

</div>

I'm not sure, but I think you should be able to update this setting  
via the update indices settings api and then restart the nodes.  
When the index is being loaded on a node during startup, the updated  
settings should be picked up.

Another approach which might be easier, is after you have changed the  
settings to close and then open the index. This way  
you don't need to restart any node.

Unfortunately this setting can can't be changed during the time an  
index is live.

Martijn

On 11 December 2012 15:03, bohemer [bohemer@gmail.com](mailto:bohemer@gmail.com) wrote:

> I have a large index with around 70M documents and in the mapping is  
> specified that the index cache type is soft. Is there a way to change to  
> index.cache.field.type setting from soft to resident without to reindex the  
> index?
> 
> --

--  
Met vriendelijke groet,

Martijn van Groningen

--

---

<div class="post-metadata">

**Author:** ![bohemer\_2](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@bohemer\_2](https://discuss.elastic.co/u/bohemer_2)\
**Post date:** [December 11, 2012, 3:32pm UTC](https://discuss.elastic.co/t/change-index-cache-field-type-on-live-index/10039/3 "2012-12-11T15:32:03Z")

</div>

Hi,

Thank you Martijn for the quick response,

I have updated the index settings on a development instance to  
index.cache.field.type = resident. the response was {"ok":true} so it  
should work. Then i closed and then opened the index , but the get index  
setting api call tells me that the cach type is still soft ☹

Any idea how should i change the index cache type without to reindex all  
the data ?

Thank You.

On Tuesday, December 11, 2012 4:16:06 PM UTC+2, Martijn v Groningen wrote:

> I'm not sure, but I think you should be able to update this setting  
> via the update indices settings api and then restart the nodes.  
> When the index is being loaded on a node during startup, the updated  
> settings should be picked up.
> 
> Another approach which might be easier, is after you have changed the  
> settings to close and then open the index. This way  
> you don't need to restart any node.
> 
> Unfortunately this setting can can't be changed during the time an  
> index is live.
> 
> Martijn
> 
> On 11 December 2012 15:03, bohemer \<[boh...@gmail.com](mailto:boh...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > I have a large index with around 70M documents and in the mapping is  
> > specified that the index cache type is soft. Is there a way to change to  
> > index.cache.field.type setting from soft to resident without to reindex  
> > the  
> > index?
> > 
> > --
> 
> --  
> Met vriendelijke groet,
> 
> Martijn van Groningen

--

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [December 11, 2012, 4:08pm UTC](https://discuss.elastic.co/t/change-index-cache-field-type-on-live-index/10039/4 "2012-12-11T16:08:14Z")

</div>

Non dynamic index properties can be updated, but the index needs to be  
closed before updating the property. Like this:

> <https://gist.github.com/martijnvg/8285c42729f8a54c5fae>

On 11 December 2012 15:16, Martijn v Groningen  
[martijn.v.groningen@gmail.com](mailto:martijn.v.groningen@gmail.com) wrote:

> I'm not sure, but I think you should be able to update this setting  
> via the update indices settings api and then restart the nodes.  
> When the index is being loaded on a node during startup, the updated  
> settings should be picked up.
> 
> Another approach which might be easier, is after you have changed the  
> settings to close and then open the index. This way  
> you don't need to restart any node.
> 
> Unfortunately this setting can can't be changed during the time an  
> index is live.
> 
> Martijn
> 
> On 11 December 2012 15:03, bohemer [bohemer@gmail.com](mailto:bohemer@gmail.com) wrote:
> 
> > I have a large index with around 70M documents and in the mapping is  
> > specified that the index cache type is soft. Is there a way to change to  
> > index.cache.field.type setting from soft to resident without to reindex the  
> > index?
> > 
> > --
> 
> --  
> Met vriendelijke groet,
> 
> Martijn van Groningen

--  
Met vriendelijke groet,

Martijn van Groningen

--

---

<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, 3:00am UTC](https://discuss.elastic.co/t/change-index-cache-field-type-on-live-index/10039/5 "2017-07-06T03:00:16Z")

</div>


