# Db autopatch like functionality for ES

**URL:** https://discuss.elastic.co/t/db-autopatch-like-functionality-for-es/11938
**Category:** Elasticsearch
**Created:** [May 13, 2013, 4:36pm UTC](https://discuss.elastic.co/t/db-autopatch-like-functionality-for-es/11938 "2013-05-13T16:36:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ben\_Siemon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben_siemon/32/2302_2.png) [@Ben\_Siemon](https://discuss.elastic.co/u/Ben_Siemon)
#### Post date: [May 13, 2013, 4:36pm UTC](https://discuss.elastic.co/t/db-autopatch-like-functionality-for-es/11938/1 "2013-05-13T16:36:23Z")

</div>

I am curious if [https://github.com/tacitknowledge/autopatch](https://github.com/tacitknowledge/autopatch) like libraries  
exist for managing schema updates to elasticsearch clusters.

If not what is the best practice for automating updates to the schema in  
ES?

I could see the need for some library that detects a breaking schema change  
and then kicks off a process to reindex else it just updates the mapping  
and moves on.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [May 13, 2013, 5:24pm UTC](https://discuss.elastic.co/t/db-autopatch-like-functionality-for-es/11938/2 "2013-05-13T17:24:45Z")

</div>

Hello Ben,

I think the most common practice is to run a  
scroll[http://www.elasticsearch.org/guide/reference/api/search/scroll/](http://www.elasticsearch.org/guide/reference/api/search/scroll/)though  
all the data in your current index and re-index it in a new index.  
Then, remove the now-outdated index.

That would only be necessary when you have some braking changes existing  
fields from your mapping. If you want to add a new field, just post a  
mapping with that field and your new mapping will be merge with the old one.

Because of that, another practice I've heard of is to use  
multi-field[http://www.elasticsearch.org/guide/reference/mapping/multi-field-type/](http://www.elasticsearch.org/guide/reference/mapping/multi-field-type/)to  
index new stuff with different settings in the same field. This works  
around the need to re-index, but searching across old and new data would be  
difficult/impossible.

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Mon, May 13, 2013 at 7:36 PM, Ben Siemon [ben.siemon@opower.com](mailto:ben.siemon@opower.com) wrote:

> I am curious if [GitHub - tacitknowledge/autopatch: An automated database patching framework for Java.](https://github.com/tacitknowledge/autopatch) like  
> libraries exist for managing schema updates to elasticsearch clusters.
> 
> If not what is the best practice for automating updates to the schema in  
> ES?
> 
> I could see the need for some library that detects a breaking schema  
> change and then kicks off a process to reindex else it just updates the  
> mapping and moves on.
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:36am UTC](https://discuss.elastic.co/t/db-autopatch-like-functionality-for-es/11938/3 "2017-07-06T02:36:54Z")

</div>


