# Why the returned field does not support aliases

**URL:** <https://discuss.elastic.co/t/why-the-returned-field-does-not-support-aliases/187242>\
**Category:** Elasticsearch\
**Created:** [June 25, 2019, 7:08am UTC](https://discuss.elastic.co/t/why-the-returned-field-does-not-support-aliases/187242 "2019-06-25T07:08:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GJZL](https://avatars.discourse-cdn.com/v4/letter/g/b2d939/32.png) [@GJZL](https://discuss.elastic.co/u/GJZL)\
**Post date:** [June 25, 2019, 7:08am UTC](https://discuss.elastic.co/t/why-the-returned-field-does-not-support-aliases/187242/1 "2019-06-25T07:08:37Z")

</div>

I didn't find the api that returned the field using the alias。I think es should support returning fields using aliases。

---

<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:** [June 25, 2019, 7:53am UTC](https://discuss.elastic.co/t/why-the-returned-field-does-not-support-aliases/187242/2 "2019-06-25T07:53:21Z")

</div>

The thing is that elasticsearch always returns the `_source` document as it was sent initially. If you sent it using an old field name, it will be returned as is.  
We never transform it.

But if you use [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-stored-fields.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-stored-fields.html) you can probably ask elasticsearch to return the exact fields you want (the new ones). Only if you have stored them though.

---

<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 23, 2019, 7:53am UTC](https://discuss.elastic.co/t/why-the-returned-field-does-not-support-aliases/187242/3 "2019-07-23T07:53:48Z")

</div>

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