# Mapping issue

**URL:** <https://discuss.elastic.co/t/mapping-issue/244421>\
**Category:** Elasticsearch\
**Created:** [August 10, 2020, 3:05pm UTC](https://discuss.elastic.co/t/mapping-issue/244421 "2020-08-10T15:05:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbasic](https://avatars.discourse-cdn.com/v4/letter/g/9de0a6/32.png) [@gbasic](https://discuss.elastic.co/u/gbasic)\
**Post date:** [August 10, 2020, 3:05pm UTC](https://discuss.elastic.co/t/mapping-issue/244421/1 "2020-08-10T15:05:31Z")

</div>

Hi I am a beginner in Elasticsearch so pardon my silly questions. I am trying to feed a json file through Logstash to Elasticsearch so I can later create visualizations in Kibana. However after I create the index and set the mapping I want, when I run the logstash.conf to import the data elasticsearch creates it's own mapping. And if I set dynamic = "strict" I get an error:

```auto
"error"=>{"type"=>"strict_dynamic_mapping_exception", "reason"=>"mapping set to strict, dynamic introduction of [Europe] within [_doc] is not allowed"}

```

This is my mapping:

```auto
curl -XPUT 127.0.0.1:9200/weather -d '
{
"mappings": { "dynamic": "strict",
"properties": {
"Date" : {"type": "date"},
"Time" : {"type" : "integer"},
"City": { "dynamic": "strict",
"properties": {
"CityName": {"type": "text"},
"Temp": {"type": "integer"},
"Humidity": {"type": "integer"},
"WindDirection": {"type": "text"},
"WindSpeed": {"type": "integer"}
}
}
}
}
}'

```

And this is my data:

```auto
{
        "Europe" => {
        "DateTime" => {
            "Time" => "15",
             "Date" => "08.08.2020"
        },
               "City" => [
            [0] {
                "WindSpeed" => "03",
                     "CityName" => "Amsterdam",
                       "Humidity" => "33",
                 "WindDirection" => "NE",
                        "Temp" => "32"
            },
            [1] {
                "WindSpeed" => "06",
                     "CityName" => "Ankara",
                       "Humidity" => "18",
                 "WindDirection" => "E",
                        "Temp" => "33"
            },

```

Any input would be really appreciated.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 10, 2020, 10:04pm UTC](https://discuss.elastic.co/t/mapping-issue/244421/2 "2020-08-10T22:04:14Z")

</div>

What does the post you are using look like?

---

<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:** [September 7, 2020, 10:04pm UTC](https://discuss.elastic.co/t/mapping-issue/244421/3 "2020-09-07T22:04:33Z")

</div>

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