# Rename source field names

**URL:** <https://discuss.elastic.co/t/rename-source-field-names/31961>\
**Category:** Elasticsearch\
**Created:** [October 10, 2015, 9:18pm UTC](https://discuss.elastic.co/t/rename-source-field-names/31961 "2015-10-10T21:18:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eddie\_Adams](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eddie_adams/32/5219_2.png) [@Eddie\_Adams](https://discuss.elastic.co/u/Eddie_Adams)\
**Post date:** [October 10, 2015, 9:18pm UTC](https://discuss.elastic.co/t/rename-source-field-names/31961/1 "2015-10-10T21:18:46Z")

</div>

I have documents with variable field names, but there are fields with the same meaning: Example:

{"ipAddress":"123.123.123.123"}  
{"client":"111.111.111.112"}  
I would like to know if it is possible to rename field name "client" to "ipAddress" I know that i can name the index:

```
"properties": {
    "client": {
        "index_name": "ipAddress",
        "index": "not_analyzed",
        "type": "string"
    },
}

```

But that works just for search, not for the source: [http://example.com:9200/estest/logs/\_search?pretty&q=ipAddress:111.111.111.112](http://example.com:9200/estest/logs/_search?pretty&q=ipAddress:111.111.111.112) result:

{  
"took" : 179,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "costest",  
"\_type" : "logs",  
"\_id" : "P5\_ZSIjtRmWcD80A1sJ7ow",  
"\_score" : 1.0,  
"\_source":{"client":"111.111.111.112"}  
} ]  
}  
}

Is it possible?

Thanx

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 11, 2015, 2:09am UTC](https://discuss.elastic.co/t/rename-source-field-names/31961/2 "2015-10-11T02:09:17Z")

</div>

You need to do that during index time.

---

<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 5, 2017, 11:45pm UTC](https://discuss.elastic.co/t/rename-source-field-names/31961/3 "2017-07-05T23:45:29Z")

</div>


