# Static mapping error

**URL:** <https://discuss.elastic.co/t/static-mapping-error/84910>\
**Category:** Elasticsearch\
**Created:** [May 8, 2017, 9:50am UTC](https://discuss.elastic.co/t/static-mapping-error/84910 "2017-05-08T09:50:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giuseppe\_Merlo](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@Giuseppe\_Merlo](https://discuss.elastic.co/u/Giuseppe_Merlo)\
**Post date:** [May 8, 2017, 9:50am UTC](https://discuss.elastic.co/t/static-mapping-error/84910/1 "2017-05-08T09:50:56Z")

</div>

Hi everyone,

as title says, i'm trying to use the disable dynamic mapping setting. I able to disable dynamic mapping for a index that i want, before this index is created.

Then, i've used the command

**curl -XPUT '[http://localhost:9220/anime/\_mapping/Anime](http://localhost:9220/anime/_mapping/Anime)' -d '@/home/giuseppe/Scrivania/StdKibi/Anime.mapping'**

and i created the mapping. In fact, if i check mapping with

**curl -XGET '[http://localhost:9220/anime?pretty](http://localhost:9220/anime?pretty)'**

the answer is:

```
    { "anime" : {
        "aliases" : { },
        "mappings" : {
     "Anime" : {
        "properties" : {
             "name" : {
                "type" : "string",
                "index" : "not_analyzed"
                          }
                         }
             }
         },
          "settings" : {
             "index" : {
               "mapper" : {
                   "dynamic" : "false"
                        },
         "creation_date" : "1494235621018",
         "number_of_shards" : "5",
         "number_of_replicas" : "1",
         "uuid" : "tEZF5w71S2i5z9erXtKF8Q",
         "version" : {
                   "created" : "2040499"
        }
      }
   },
"warmers" : { }}}

```

Now, when i try to put my document, i get this error:  
**"type":"illegal\_state\_exception","reason":"trying to auto create mapping, but dynamic mapping is disabled"**

Can anyone help me?

Thanks a lot!

---

<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 5, 2017, 9:50am UTC](https://discuss.elastic.co/t/static-mapping-error/84910/2 "2017-06-05T09:50:58Z")

</div>

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