# Type not supported exception, index mapping ignored

**URL:** <https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [February 25, 2019, 1:28pm UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842 "2019-02-25T13:28:44Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarkin67](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@tarkin67](https://discuss.elastic.co/u/tarkin67)\
**Post date:** [February 25, 2019, 1:28pm UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/1 "2019-02-25T13:28:44Z")

</div>

Hi,

I am encountering an issue with canvas: when querying all fields of a particular index with **essql** or **esdocs** the canvas element fails with the following error message:

```
[esdocs] > Unexpected error from Elasticsearch: [sql_illegal_argument_exception] Type Integer (returned by [telegramlog.telegram.loadInformation]) is not supported

```

This seems odd to me since the field in question is explicitly mapped as a text field in the index mapping which we configure via template:

```
"telegramlog.telegram.loadInformation": {
      "type": "text",
      "fields": {
        "keyword": {
          "type": "keyword",
          "ignore_above": 256
        }
      }
    }

```

And also appears as text in the discover view:  
 ![grafik](https://us1.discourse-cdn.com/elastic/original/3X/7/9/791ddd8785ca5dc9a54ef03d136e2904ffffa25b.png)

Any idea what might cause this or how to work around it?

Thanks and regards

---

<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:** [February 26, 2019, 9:01am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/2 "2019-02-26T09:01:03Z")

</div>

@tarkin67 if you run a request straight to ES-SQL (bypassing Canvas) do you get an error?

---

<div class="post-metadata">

**Author:** ![tarkin67](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@tarkin67](https://discuss.elastic.co/u/tarkin67)\
**Post date:** [February 26, 2019, 12:32pm UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/3 "2019-02-26T12:32:10Z")

</div>

Yes, executing the elastic sql request from the management console throws the same error.

---

<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:** [February 27, 2019, 5:22am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/4 "2019-02-27T05:22:30Z")

</div>

@tarkin67 I have few questions to help with the investigation:

- what is the query you are running?
- Is it against one index or multiple?
  - If multiple, are you sure all the indices have `telegramlog.telegram.loadInformation` mapped as `text`?

- what ES version is this?
- can you share the error stacktrace from ES logs?

Thanks.

---

<div class="post-metadata">

**Author:** ![tarkin67](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@tarkin67](https://discuss.elastic.co/u/tarkin67)\
**Post date:** [February 27, 2019, 8:09am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/5 "2019-02-27T08:09:52Z")

</div>

Sure, I run the following from the management console:

```
GET _xpack/sql
    {
      "query":"select * from \"wm6-telegramlog-*\""
    }

```

This matches exactly one index (_wm6-telegramlog-2019.02-v1_) that has the `telegramlog.telegram.loadInformation` field mapped as `text`. Replacing the wildcard index name in the query with the exact index name does not make any difference.

Running a standard query from the console (`GET wm6-telegramlog-*/_search`) works fine. However, when querying the index from **canvas** , it does not make any difference whether I am using the `essql` or `esdocs` function, both will throw the same error as the ES-SQL query above.

I am running ES and Kibana **6.6.1**. The character limit does not let me paste the stacktrace here so I uploaded it to [textuploader.com](http://textuploader.com), you can access it [here](https://textuploader.com/15ru3).

Thanks for your help

---

<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:** [February 27, 2019, 8:14am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/6 "2019-02-27T08:14:31Z")

</div>

@tarkin67 thank you for the additional details. One more ask, if possible: can you provide the complete mapping and settings (`GET /wm6-telegramlog-2019.02-v1`) of this index?

---

<div class="post-metadata">

**Author:** ![tarkin67](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@tarkin67](https://discuss.elastic.co/u/tarkin67)\
**Post date:** [February 27, 2019, 8:23am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/7 "2019-02-27T08:23:40Z")

</div>

Sure! I had to upload it to TextUploader again, sorry for the inconvenience: [https://textuploader.com/15rfs](https://textuploader.com/15rfs)

Thanks

---

<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:** [March 1, 2019, 5:57am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/8 "2019-03-01T05:57:04Z")

</div>

@tarkin67 I've performed some tests and I can only get that error if:

- I create a new index called `wm6-telegramlog-2019.02-v2` and I remove from the mapping the `loadInformation` subfield
- I index the following document, forcing Elasticsearch to create to auto-create the `loadInformation` subfield with the type `long` (yes, not `integer`):

```auto
{"telegramlog":{"telegram":{"loadInformation":123}}}

```

- run this query `select * from \"wm6-telegramlog-*\"` so that my query touches both these indices with different mappings.
- are you very sure that the scenario above doesn't happen in your case? Can you, please, double check the index being queried, its mapping and the query itself?

---

<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:** [March 1, 2019, 6:17am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/9 "2019-03-01T06:17:30Z")

</div>

Leaving aside the way you tested this, I think there is an issue here. ES-SQL should have thrown an error for a situation where the mappings for the same field are different (considering my scenario above - `telegramlog.telegram.loadInformation` being both `text` and `long` in two different indices). Still looking into this one...

---

<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:** [March 1, 2019, 8:41am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/10 "2019-03-01T08:41:07Z")

</div>

@tarkin67 after some investigation, I've created this issue: [https://github.com/elastic/elasticsearch/issues/39547](https://github.com/elastic/elasticsearch/issues/39547). Still waiting to hear from you if the query is actually somehow touching two different indices, but even if not (which is a different problem somehow), the issue I just opened is something we need to fix.

Thank you for reporting it.

---

<div class="post-metadata">

**Author:** ![tarkin67](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@tarkin67](https://discuss.elastic.co/u/tarkin67)\
**Post date:** [March 4, 2019, 7:41am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/11 "2019-03-04T07:41:03Z")

</div>

@Andrei_Stefan thank you for looking into this and creating the issue!

I just quickly double checked that the query only touches one index and to my knowledge it does. There exists exactly one `wm6-telegramlog-2019.02-v1` index and none of the other indices have any aliases configured that would match the `wm6-telegramlog-*` pattern in the query. Plus I also get the error if I specify the exact index name like so:

```
GET _xpack/sql
{
  "query":"select * from \"wm6-telegramlog-2019.02-v1\""
}

```

The indexed documents themselves contain `integers` in the loadInformation field  
 ![grafik](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f624b4fcd36bca1c54e0a380deadfb201fc88d57.png)

But the field is mapped as `text` in the wm6-telegramlog index mapping:  
 ![grafik](https://us1.discourse-cdn.com/elastic/original/3X/0/5/05a22d610c7c6c2a0f41517f3ec701dcd04ce7bb.png)

So as long as elasticsearch does not do some kind of voodoo I don't understand, only that one index is touched by the query which has the field mapped as text.

Regards

---

<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:** [March 4, 2019, 2:18pm UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/12 "2019-03-04T14:18:19Z")

</div>

@tarkin67 that bug is already fixed and will be available first in the versions mentioned in the corresponding PR. If you could test this when any of those versions get released, I would be interested in seeing if it's fixing this issue you have. Thanks.

---

<div class="post-metadata">

**Author:** ![tarkin67](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@tarkin67](https://discuss.elastic.co/u/tarkin67)\
**Post date:** [March 4, 2019, 2:28pm UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/13 "2019-03-04T14:28:56Z")

</div>

Sure, I'll let you know once I got to test it.

---

<div class="post-metadata">

**Author:** ![tarkin67](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@tarkin67](https://discuss.elastic.co/u/tarkin67)\
**Post date:** [March 18, 2019, 9:55am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/14 "2019-03-18T09:55:51Z")

</div>

So I finally got around to test with elastic and kibana 6.6.2.

Turns out I still get the exact same error when querying the telegramlog index:

```
{
  "error": {
    "root_cause": [
      {
        "type": "sql_illegal_argument_exception",
        "reason": "Type Integer (returned by [telegramlog.telegram.loadInformation]) is not supported"
      }
    ],
    "type": "sql_illegal_argument_exception",
    "reason": "Type Integer (returned by [telegramlog.telegram.loadInformation]) is not supported"
  },
  "status": 500
}

```

[Here](https://textuploader.com/15zf0)'s the stacktrace. Hope this helps!

Thanks and regards

---

<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:** [March 20, 2019, 3:42pm UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/15 "2019-03-20T15:42:40Z")

</div>

@tarkin67 you are correct. Apologies. It was a slight overlook from our side. The fix was backported to 6.6 now. It should be available in 6.6.3. Sorry about that.

---

<div class="post-metadata">

**Author:** ![tarkin67](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@tarkin67](https://discuss.elastic.co/u/tarkin67)\
**Post date:** [March 25, 2019, 7:09am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/16 "2019-03-25T07:09:14Z")

</div>

alright, I'll check again once 6.6.3 is available 🙂

---

<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:** [April 22, 2019, 7:09am UTC](https://discuss.elastic.co/t/type-not-supported-exception-index-mapping-ignored/169842/17 "2019-04-22T07:09:16Z")

</div>

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