# Renaming any field. in elastic search

**URL:** <https://discuss.elastic.co/t/renaming-any-field-in-elastic-search/11460>\
**Category:** Elasticsearch\
**Created:** [April 5, 2013, 9:25am UTC](https://discuss.elastic.co/t/renaming-any-field-in-elastic-search/11460 "2013-04-05T09:25:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohit\_Kumar](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@mohit\_Kumar](https://discuss.elastic.co/u/mohit_Kumar)\
**Post date:** [April 5, 2013, 9:25am UTC](https://discuss.elastic.co/t/renaming-any-field-in-elastic-search/11460/1 "2013-04-05T09:25:40Z")

</div>

Hi folks,  
Can you please help in renaming any field name in elastic search.  
I want to rename a field.  
For example.  
{"field":{"MsgData":"abc"} this is my filed.  
after running the query  
how can i rename the MsgData field with DATA .ie DATA:abc in output.

Regrads  
Mohit Kumar Yadav  
[mohit.kumar.ngi@gmail.com](mailto:mohit.kumar.ngi@gmail.com)

--  
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:** ![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:** [April 5, 2013, 9:27am UTC](https://discuss.elastic.co/t/renaming-any-field-in-elastic-search/11460/2 "2013-04-05T09:27:06Z")

</div>

You have to push again the document with the new field with the same index/type/ID.  
{"field":{"DATA":"abc"} }

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 5 avr. 2013 à 11:25, Mohit Kumar Yadav [mohit.kumar.ngi@gmail.com](mailto:mohit.kumar.ngi@gmail.com) a écrit :

> Hi folks,  
> Can you please help in renaming any field name in Elasticsearch.  
> I want to rename a field.  
> For example.  
> {"field":{"MsgData":"abc"} this is my filed.  
> after running the query  
> how can i rename the MsgData field with DATA .ie DATA:abc in output.
> 
> Regrads  
> Mohit Kumar Yadav
> 
> --  
> 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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 5, 2013, 9:34am UTC](https://discuss.elastic.co/t/renaming-any-field-in-elastic-search/11460/3 "2013-04-05T09:34:53Z")

</div>

Hey,

you can also rename index names in the mapping if you want (but I am afraid  
this will make things A LOT less transparent), see  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/core-types/) and the  
index\_name attribute

On Fri, Apr 5, 2013 at 11:27 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> You have to push again the document with the new field with the same  
> index/type/ID.  
> {"field":{"DATA":"abc"} }
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 5 avr. 2013 à 11:25, Mohit Kumar Yadav [mohit.kumar.ngi@gmail.com](mailto:mohit.kumar.ngi@gmail.com) a  
> écrit :
> 
> Hi folks,  
> Can you please help in renaming any field name in Elasticsearch.  
> I want to rename a field.  
> For example.  
> {"field":{"MsgData":"abc"} this is my filed.  
> after running the query  
> how can i rename the MsgData field with DATA .ie DATA:abc in output.
> 
> Regrads  
> Mohit Kumar Yadav  
> [mohit.kumar.ngi@gmail.com](mailto:mohit.kumar.ngi@gmail.com)
> 
> --  
> 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).

--  
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:42am UTC](https://discuss.elastic.co/t/renaming-any-field-in-elastic-search/11460/4 "2017-07-06T02:42:41Z")

</div>


