# Validation failed: 1 :Mapping type is missing

**URL:** <https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938>\
**Category:** Elasticsearch\
**Created:** [May 11, 2020, 6:36am UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938 "2020-05-11T06:36:43Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matish\_Bhuyan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matish_bhuyan/32/68043_2.png) [@Matish\_Bhuyan](https://discuss.elastic.co/u/Matish_Bhuyan)\
**Post date:** [May 11, 2020, 6:36am UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/1 "2020-05-11T06:36:44Z")

</div>

Hi I am a newbie to Elastic search

I have created an index which source field is bit lengthy and i am suspecting that the ignore\_above is restricting to visualize my data in Kibana.

So i went on trying to change the Ignore\_above value but getting this error.

Here is the error and also my index mapping values,please help me out.

## Request

```
PUT /filebeat6_example/_mapping/
{
    "message": {
      "type": {
        "type": "text",
        "ignore_above": 32766
      }
    }
}

```

Response--

```
{
  "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
}

```

# My Index default mapping values

GET /filebeat6\_example/\_mapping

## Response

```
{
  "filebeat6_example": {
    "mappings": {
      "doc": {
        "properties": {
          "@timestamp": {
            "type": "date"
          },
          "@version": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "beat": {
            "properties": {
              "hostname": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              "name": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              "version": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              }
            }
          },
          "host": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "message": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "offset": {
            "type": "long"
          },
          "prospector": {
            "properties": {
              "type": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              }
            }
          },
          "source": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "tags": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      }
    }
  }
}
```

---

<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:** [May 11, 2020, 7:53am UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/2 "2020-05-11T07:53:15Z")

</div>

Welcome!

What is your elasticsearch version?

---

<div class="post-metadata">

**Author:** ![Matish\_Bhuyan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matish_bhuyan/32/68043_2.png) [@Matish\_Bhuyan](https://discuss.elastic.co/u/Matish_Bhuyan)\
**Post date:** [May 11, 2020, 7:56am UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/3 "2020-05-11T07:56:36Z")

</div>

Hi,  
It's 6.1.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:** [May 11, 2020, 9:27am UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/4 "2020-05-11T09:27:17Z")

</div>

Any reason you can not use 7.6?

Anyway here is the documentation for PUT Mapping API for your version: [https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-put-mapping.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/indices-put-mapping.html)

---

<div class="post-metadata">

**Author:** ![Matish\_Bhuyan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matish_bhuyan/32/68043_2.png) [@Matish\_Bhuyan](https://discuss.elastic.co/u/Matish_Bhuyan)\
**Post date:** [May 11, 2020, 11:07am UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/5 "2020-05-11T11:07:53Z")

</div>

Well i can't as in my organisation they told me to use to this version only

So any help for this version will really be helpful for me.

As per the link you have shared my index mapping value type is doc

So i modified the request body to this

```
PUT /filebeat6_example/_mapping/doc
{
    "message": {
      "type": {
        "type": "text",
        "ignore_above": 32766
      }
    }
}

```

got this error

```
"error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "Root mapping definition has unsupported parameters: [message : {type={type=text, ignore_above=32766}}]"Preformatted text
```

---

<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:** [May 11, 2020, 12:18pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/6 "2020-05-11T12:18:03Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

About your error, please look again at the documentation. You're missing the type name in the json body.

---

<div class="post-metadata">

**Author:** ![Matish\_Bhuyan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matish_bhuyan/32/68043_2.png) [@Matish\_Bhuyan](https://discuss.elastic.co/u/Matish_Bhuyan)\
**Post date:** [May 11, 2020, 12:25pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/7 "2020-05-11T12:25:16Z")

</div>

My Apologies i have formatted the request and response body in my previous msg

---

<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:** [May 11, 2020, 12:56pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/8 "2020-05-11T12:56:05Z")

</div>

Thanks!

Did you solve the problem?

---

<div class="post-metadata">

**Author:** ![Matish\_Bhuyan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matish_bhuyan/32/68043_2.png) [@Matish\_Bhuyan](https://discuss.elastic.co/u/Matish_Bhuyan)\
**Post date:** [May 11, 2020, 5:52pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/9 "2020-05-11T17:52:07Z")

</div>

nope the issue hasn't been resolved

---

<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:** [May 11, 2020, 8:47pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/10 "2020-05-11T20:47:59Z")

</div>

Did you apply my advice?

> About your error, please look again at the documentation. You're missing the type name in the json body.

---

<div class="post-metadata">

**Author:** ![Matish\_Bhuyan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matish_bhuyan/32/68043_2.png) [@Matish\_Bhuyan](https://discuss.elastic.co/u/Matish_Bhuyan)\
**Post date:** [May 11, 2020, 9:14pm UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/11 "2020-05-11T21:14:48Z")

</div>

{  
"message": {  
"type": {  
"type": "text",  
"ignore\_above": 32766`Preformatted text`

Here i have mentioned the type name in the json body as per the documentation provided by you

---

<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:** [May 12, 2020, 3:15am UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/12 "2020-05-12T03:15:41Z")

</div>

Your mapping type is `doc`.  
It should appear in the json as the documentation shows it.

Please share the full request you are sending to elasticsearch if you still can't make it work. And check the preview window for code formatting issues.

---

<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:** [June 9, 2020, 3:15am UTC](https://discuss.elastic.co/t/validation-failed-1-mapping-type-is-missing/231938/13 "2020-06-09T03:15:45Z")

</div>

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