# Mapping type is missing

**URL:** <https://discuss.elastic.co/t/mapping-type-is-missing/201577>\
**Category:** Elasticsearch\
**Created:** [September 30, 2019, 6:29am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577 "2019-09-30T06:29:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reena\_Raghavan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reena_raghavan/32/55094_2.png) [@Reena\_Raghavan](https://discuss.elastic.co/u/Reena_Raghavan)\
**Post date:** [September 30, 2019, 6:29am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/1 "2019-09-30T06:29:24Z")

</div>

![Screenshot%20from%202019-09-30%2012-07-47](https://us1.discourse-cdn.com/elastic/original/3X/3/f/3f5f6dcd0ce5eb44579277199832a2d8356021f5.png)

---

<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:** [September 30, 2019, 1:36pm UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/2 "2019-09-30T13:36:13Z")

</div>

I'm afraid we cannot help without knowing any context.  
Where this is coming from ?

---

<div class="post-metadata">

**Author:** ![Reena\_Raghavan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reena_raghavan/32/55094_2.png) [@Reena\_Raghavan](https://discuss.elastic.co/u/Reena_Raghavan)\
**Post date:** [October 1, 2019, 4:40am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/3 "2019-10-01T04:40:49Z")

</div>

I am working in Drupal. This message was displayed after creating index. The elastic search version used for this is 6 and when I upgraded to elastic search version 7 the error is not coming. I want to know why is this error shown in elastic search version 6 and not in elastic search version 7.

---

<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:** [October 1, 2019, 5:04am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/4 "2019-10-01T05:04:08Z")

</div>

We started to remove types in 7.0.  
The API changed a bit due to that.

You probably have in Drupal a module for es 7 and one for es 6, right?

---

<div class="post-metadata">

**Author:** ![Reena\_Raghavan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reena_raghavan/32/55094_2.png) [@Reena\_Raghavan](https://discuss.elastic.co/u/Reena_Raghavan)\
**Post date:** [October 1, 2019, 5:30am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/5 "2019-10-01T05:30:37Z")

</div>

I am not clear with your question.  
What I did is when I got this error i just changed the Elastic Search Version from 6 to 7. Then the error disappeared for Index creation.

**Below is the error which i get while saving index**  
"error":{"root\_cause":[{"type":"action\_request\_validation\_exception","reason":"Validation Failed: 1: mapping type is missing;"}],"type":"action\_request\_validation\_exception","reason":"Validation Failed: 1: mapping type is missing;"},"status":400}

**Below is the error which i get while saving index fields**  
{"error":{"root\_cause":[{"type":"action\_request\_validation\_exception","reason":"Validation Failed: 1: type is missing;2: type is missing;3:

---

<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:** [October 1, 2019, 5:47am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/6 "2019-10-01T05:47:50Z")

</div>

You need to use elasticsearch version 7.

If you want to use an older version, like elasticsearch 6 or 5, you need to change the mapping which is sent to elasticsearch. I guess that the Drupal connector generates the mapping for you, but as I don't know Drupal, I might be wrong.

---

<div class="post-metadata">

**Author:** ![Reena\_Raghavan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reena_raghavan/32/55094_2.png) [@Reena\_Raghavan](https://discuss.elastic.co/u/Reena_Raghavan)\
**Post date:** [October 1, 2019, 5:57am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/7 "2019-10-01T05:57:29Z")

</div>

Yes you are right.  
In Drupal, elastic search connector does the mapping.

---

<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:** [October 1, 2019, 6:13am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/8 "2019-10-01T06:13:23Z")

</div>

It means that you need to use a compatible connector for the elasticsearch version you are using.

---

<div class="post-metadata">

**Author:** ![Reena\_Raghavan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reena_raghavan/32/55094_2.png) [@Reena\_Raghavan](https://discuss.elastic.co/u/Reena_Raghavan)\
**Post date:** [October 1, 2019, 7:40am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/9 "2019-10-01T07:40:21Z")

</div>

Thanks for your reply.  
I have not found any compatible elastic search connector for the version which I am using, so using the latest version of Elastic Search.

---

<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:** [October 29, 2019, 7:40am UTC](https://discuss.elastic.co/t/mapping-type-is-missing/201577/10 "2019-10-29T07:40:23Z")

</div>

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