# Rename field names while Indexing a document

**URL:** https://discuss.elastic.co/t/rename-field-names-while-indexing-a-document/203989
**Category:** Elasticsearch
**Created:** [October 17, 2019, 7:09am UTC](https://discuss.elastic.co/t/rename-field-names-while-indexing-a-document/203989 "2019-10-17T07:09:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Revanth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/revanth/32/50878_2.png) [@Revanth](https://discuss.elastic.co/u/Revanth)
#### Post date: [October 17, 2019, 7:09am UTC](https://discuss.elastic.co/t/rename-field-names-while-indexing-a-document/203989/1 "2019-10-17T07:09:07Z")

</div>

I have a JSON object with some of the fields like this:-

```
    {
        "desc": "this is test description",
        "name": "some random name",
    }

```

While indexing this document, I would like to change the field names and my document after indexing should look like this:-

```
{
    "description": "this is test description",
    "user_name": "some random name",
}

```

I've read about the Ingest pipeline processort but they only rename after a field is created. Is there any way that I could change the field names while indexing?

---

<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: [November 14, 2019, 7:09am UTC](https://discuss.elastic.co/t/rename-field-names-while-indexing-a-document/203989/2 "2019-11-14T07:09:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
