# Removal of mapping types in 7.x: why not include index aliases in results?

**URL:** <https://discuss.elastic.co/t/removal-of-mapping-types-in-7-x-why-not-include-index-aliases-in-results/263293>\
**Category:** Elasticsearch\
**Created:** [February 4, 2021, 7:10pm UTC](https://discuss.elastic.co/t/removal-of-mapping-types-in-7-x-why-not-include-index-aliases-in-results/263293 "2021-02-04T19:10:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Doman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomas_doman/32/11409_2.png) [@Thomas\_Doman](https://discuss.elastic.co/u/Thomas_Doman)\
**Post date:** [February 4, 2021, 7:10pm UTC](https://discuss.elastic.co/t/removal-of-mapping-types-in-7-x-why-not-include-index-aliases-in-results/263293/1 "2021-02-04T19:10:56Z")

</div>

ES: 6.8.13  
NEST: 6.8.6

We're preparing to upgrade to ES 7.x and are considering the type removal.  
We've reviewed the suggestions in [Removal of mapping types](https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html).  
Since the 1.x days, we haven't had multiple types in any of our indexes.  
We do, however, search many indexes at once. So, currently, we use `_type` as a dictionary key to look up the appropriate model in which to deserialize each result. The suggested approach for 7.x is to add a type field to each document. I don't love that approach in that it's inclusion is merely "by convention" and adds yet another field to my documents.  
What I'd like to know is why the indexes alias can't be returned instead of, or in addition to, the physical index name? We do name our physical indexes "by convention" which I _ **could** _ use as some sort of "starts with" check to do my deserialization model lookup but, again, that's by convention.  
Is this something I should raise as an issue w/ Elastic? Perhaps in ES 8 we could get the alias returned. Other suggestions as to other ways to address?

Raised as an issue [in the elastic project.](https://github.com/elastic/elasticsearch/issues/68549)

---

<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:** [March 4, 2021, 7:11pm UTC](https://discuss.elastic.co/t/removal-of-mapping-types-in-7-x-why-not-include-index-aliases-in-results/263293/2 "2021-03-04T19:11:17Z")

</div>

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