# Create Mapping for new field when using json files

**URL:** https://discuss.elastic.co/t/create-mapping-for-new-field-when-using-json-files/14506
**Category:** Elasticsearch
**Created:** [November 20, 2013, 11:54pm UTC](https://discuss.elastic.co/t/create-mapping-for-new-field-when-using-json-files/14506 "2013-11-20T23:54:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hemant\_pahilwani](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@hemant\_pahilwani](https://discuss.elastic.co/u/hemant_pahilwani)
#### Post date: [November 20, 2013, 11:54pm UTC](https://discuss.elastic.co/t/create-mapping-for-new-field-when-using-json-files/14506/1 "2013-11-20T23:54:27Z")

</div>

I am currently creating mapping for each index by placing json mapping  
files under /config/mappings/[index\_name] directory as  
per: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-conf-mappings.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-conf-mappings.html)

The process works great when new index is introduced but i am not able to  
figure out how to create mappings using json config files when new field is  
introduced in existing index.

http PUT mapping is not an option as the servers are not http enabled. And  
doing PUT through Java API on each env seems cumbersome as there are lots  
of them.

Other option that i thought of was to create new version of index with new  
field and reindex documents as mentioned  
in [http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/](http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/).  
Keeping this as last resort if there is no other way to do it.

--  
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: ![hemant\_pahilwani](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@hemant\_pahilwani](https://discuss.elastic.co/u/hemant_pahilwani)
#### Post date: [November 25, 2013, 6:18pm UTC](https://discuss.elastic.co/t/create-mapping-for-new-field-when-using-json-files/14506/2 "2013-11-25T18:18:56Z")

</div>

_ **bump** _

On Wednesday, November 20, 2013 3:54:27 PM UTC-8, hemant pahilwani wrote:

> I am currently creating mapping for each index by placing json mapping  
> files under /config/mappings/[index\_name] directory as per:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-conf-mappings.html)[http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fmapping-conf-mappings.html&sa=D&sntz=1&usg=AFQjCNEz7ryeycuL2T8ez0tGFqZ4pPVhLA](http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fmapping-conf-mappings.html&sa=D&sntz=1&usg=AFQjCNEz7ryeycuL2T8ez0tGFqZ4pPVhLA)
> 
> The process works great when new index is introduced but i am not able to  
> figure out how to create mappings using json config files when new field is  
> introduced in existing index.
> 
> http PUT mapping is not an option as the servers are not http enabled.  
> And doing PUT through Java API on each env seems cumbersome as there are  
> lots of them.
> 
> Other option that i thought of was to create new version of index with new  
> field and reindex documents as mentioned in  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/)[http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fblog%2Fchanging-mapping-with-zero-downtime%2F&sa=D&sntz=1&usg=AFQjCNEXC1bLQ8rTVWsMrtlW9s98zo8RJg](http://www.google.com/url?q=http%3A%2F%2Fwww.elasticsearch.org%2Fblog%2Fchanging-mapping-with-zero-downtime%2F&sa=D&sntz=1&usg=AFQjCNEXC1bLQ8rTVWsMrtlW9s98zo8RJg).  
> Keeping this as last resort if there is no other way to do it.

--  
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:04am UTC](https://discuss.elastic.co/t/create-mapping-for-new-field-when-using-json-files/14506/3 "2017-07-06T02:04:55Z")

</div>


