# Return alias-id instead of index-id

**URL:** <https://discuss.elastic.co/t/return-alias-id-instead-of-index-id/151883>\
**Category:** Elasticsearch\
**Created:** [October 10, 2018, 3:48pm UTC](https://discuss.elastic.co/t/return-alias-id-instead-of-index-id/151883 "2018-10-10T15:48:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasl](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jasl](https://discuss.elastic.co/u/jasl)\
**Post date:** [October 10, 2018, 3:48pm UTC](https://discuss.elastic.co/t/return-alias-id-instead-of-index-id/151883/1 "2018-10-10T15:48:29Z")

</div>

When doing a suggestion query to multiple index, I need to know which index is returning the suggestions to display it properly.

When using aliases, it works as expected except the ruslts include "realname" instead of "alias name".

Is it possible to change this?

Ex (only copying relevant part):

```auto
suggest:
  suggestion:
    text: bar
      options:
        text: bar bar bar
        _index: foo-03

```

so `foo-03` is real-index with alias `foo`, I would like to get `_index: foo` or at least the alias name included in other attribute.

Is this possible?

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [October 12, 2018, 11:56am UTC](https://discuss.elastic.co/t/return-alias-id-instead-of-index-id/151883/2 "2018-10-12T11:56:37Z")

</div>

no this is not possible at this point

---

<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 9, 2018, 11:56am UTC](https://discuss.elastic.co/t/return-alias-id-instead-of-index-id/151883/3 "2018-11-09T11:56:39Z")

</div>

Closed on November 9, 2018, 11:56am UTC

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