# ES 6.4.0 Field aliases

**URL:** <https://discuss.elastic.co/t/es-6-4-0-field-aliases/146515>\
**Category:** Elasticsearch\
**Created:** [August 29, 2018, 10:52am UTC](https://discuss.elastic.co/t/es-6-4-0-field-aliases/146515 "2018-08-29T10:52:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [August 29, 2018, 10:52am UTC](https://discuss.elastic.co/t/es-6-4-0-field-aliases/146515/1 "2018-08-29T10:52:18Z")

</div>

Hi Team,

I would like to find out more about how the [new field aliases feature](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/release-notes-6.4.0.html#feature-6.4.0) works in ES 6.4.0 as [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html) seem to be not yet up-to-date.

According to this issue [#23714](https://github.com/elastic/elasticsearch/issues/23714), there is now a new field `type` called `alias` and we can create a new field alias like so:

```auto
PUT my_index
{
  "mappings": {
    "my_type": {
      "properties": {
        "host": {
          "properties": {
            "source_ip": {
              "type": "ip"
            }
          }
        },
        "sourceIP": {
          "type": "alias",
          "path": "host.source_ip"
        }
      }
    }
  }
}

```

Can this be applied to existing indexes? If so, what is the recommended way of doing this - can we just apply the settings on the fly or do we need to close the index, apply the settings then reopen?

Many thanks for your help,

---

<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:** [August 30, 2018, 6:04am UTC](https://discuss.elastic.co/t/es-6-4-0-field-aliases/146515/2 "2018-08-30T06:04:13Z")

</div>

You can apply it to existing indices, as long as you don't change any of the existing mappings.

---

<div class="post-metadata">

**Author:** ![ld\_pvl](https://avatars.discourse-cdn.com/v4/letter/l/cdc98d/32.png) [@ld\_pvl](https://discuss.elastic.co/u/ld_pvl)\
**Post date:** [August 30, 2018, 9:36am UTC](https://discuss.elastic.co/t/es-6-4-0-field-aliases/146515/3 "2018-08-30T09:36:46Z")

</div>

That's great, thanks!

---

<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:** [September 27, 2018, 9:36am UTC](https://discuss.elastic.co/t/es-6-4-0-field-aliases/146515/4 "2018-09-27T09:36:48Z")

</div>

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