# Alias/sql issue

**URL:** <https://discuss.elastic.co/t/alias-sql-issue/140208>\
**Category:** Elasticsearch\
**Created:** [July 16, 2018, 7:35pm UTC](https://discuss.elastic.co/t/alias-sql-issue/140208 "2018-07-16T19:35:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bossi6of9](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@bossi6of9](https://discuss.elastic.co/u/bossi6of9)\
**Post date:** [July 16, 2018, 7:35pm UTC](https://discuss.elastic.co/t/alias-sql-issue/140208/1 "2018-07-16T19:35:21Z")

</div>

Hi,

I am trying to use the elastic sql cli command. I setup an alias to cover multiple indexes, but now when I query via sql cli, I get the following:

sql\> select \* from all\_netflow\_indices limit 1;  
Bad request [Found 1 problem(s)  
line 1:15: [all\_netflow\_indices] points to indices [netflow-2018.07.16] and [netflow-2018.07.16] which have different mappings. When using multiple indices, the mappings must be identical.]

---

<div class="post-metadata">

**Author:** ![Andrei\_Stefan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrei_stefan/32/47533_2.png) [@Andrei\_Stefan](https://discuss.elastic.co/u/Andrei_Stefan)\
**Post date:** [July 18, 2018, 6:03am UTC](https://discuss.elastic.co/t/alias-sql-issue/140208/2 "2018-07-18T06:03:16Z")

</div>

Hi @bossi6of9,

Thank you for taking ES SQL for a spin and reporting your finds.  
The error message is partially correct:

- to be able to query multiple indices, at the moment (we do have an [enhancement on our to-do list](https://github.com/elastic/elasticsearch/issues/31837)), they have to have identical mappings
- because of [this bug](https://github.com/elastic/elasticsearch/issues/31784), the error message incorrectly mentions the problematic indices' mappings and states the **same index twice**

I hope this clarifies better the issue you encounter.

---

<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:** [August 15, 2018, 6:03am UTC](https://discuss.elastic.co/t/alias-sql-issue/140208/3 "2018-08-15T06:03:17Z")

</div>

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