# Unable to put settings for Index template

**URL:** <https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156>\
**Category:** Elasticsearch\
**Created:** [October 19, 2018, 10:30am UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156 "2018-10-19T10:30:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasdmc](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@prasdmc](https://discuss.elastic.co/u/prasdmc)\
**Post date:** [October 19, 2018, 10:30am UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156/1 "2018-10-19T10:30:46Z")

</div>

Hi,

I tried to apply Index template setting parameter { "ignore\_malformed: true"} and it changes to {"ignore\_malformed": "true" } , from boolean to string.

I used kibana console.

// PUT \_template/myindex  
{  
"order" : 0,  
"index\_patterns" : [  
"myindex-\*"  
],  
"settings" : {  
"index" : {  
"mapping" : {  
"ignore\_malformed" : true  
}  
},  
"mappings" : { },  
"aliases" : { }  
}  
}

Please let me know how to fix this.

Thanks,  
Pras

---

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [October 19, 2018, 10:40am UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156/2 "2018-10-19T10:40:37Z")

</div>

It worked for me in Kibana, when removing the two slashes in front of PUT:

```
PUT _template/myindex
{
  "order" : 0,
  "index_patterns" : ["myindex-*"],
  "settings" : {
    "index" : {
      "mapping" : { "ignore_malformed" : true }
    },
    "mappings" : { },
    "aliases" : { }
  }
}

```

I then fetched it with a **GET \_template/myindex** call in Kibana and got:

```
{
  "myindex": {
    "order": 0,
    "index_patterns": [
      "myindex-*"
    ],
    "settings": {
      "index": {
        "mapping": {
          "ignore_malformed": "true"
        }
      }
    },
    "mappings": {},
    "aliases": {}
  }
}
```

---

<div class="post-metadata">

**Author:** ![prasdmc](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@prasdmc](https://discuss.elastic.co/u/prasdmc)\
**Post date:** [October 19, 2018, 11:31am UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156/3 "2018-10-19T11:31:41Z")

</div>

Hi Brent,

I also get this { "ignore\_malformed": "true" }. Shouldn't boolean be just { true }, { "true" } is a string, right?

// is used for markup, didn't work.:)🙃

Thanks,  
Pras

---

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [October 19, 2018, 11:58am UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156/4 "2018-10-19T11:58:03Z")

</div>

I'm sorry, I thought the problem was that you couldn't install the mapping.

I agree, i think _"true"_ should be _true_ so there must be something wrong with that mapping. I'm not very familiar with the **ignore\_malformed** parameter but the [official documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-malformed.html) seems to indicate that you need to set is as a property on the document field which you want to ignore, if it is malformed.

For instance, this mapping test works for me:

```
PUT _template/myindex
{
  "order" : 0,
  "index_patterns" : ["myindex-*"],
  "mappings" : {
      "_doc" : {
        "properties" : {
          "field" : {
            "type" : "integer",
            "ignore_malformed" : true
          }
        }
      }
  }
}

GET _template/myindex
{
  "myindex": {
    "order": 0,
    "index_patterns": [
      "myindex-*"
    ],
    "settings": {},
    "mappings": {
      "_doc": {
        "properties": {
          "field": {
            "type": "integer",
            "ignore_malformed": true
          }
        }
      }
    },
    "aliases": {}
  }
}

```

Good luck!

---

<div class="post-metadata">

**Author:** ![prasdmc](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@prasdmc](https://discuss.elastic.co/u/prasdmc)\
**Post date:** [October 19, 2018, 12:42pm UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156/5 "2018-10-19T12:42:59Z")

</div>

This is the problem, when you apply it to index setting it becomes {"true"} ,else for any other fields it is {true}.

Please try it on your index settings. Not sure if I am doing something wrong or it's a bug.

Thanks,  
Pras

---

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [October 19, 2018, 12:57pm UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156/6 "2018-10-19T12:57:17Z")

</div>

I already tried it in the index settings and got the same result you did, which is why I guess it must be used inside a document field's "properties" element, as I illustrated earlier, not directly under "settings". But I could be wrong about that guess.

---

<div class="post-metadata">

**Author:** ![prasdmc](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@prasdmc](https://discuss.elastic.co/u/prasdmc)\
**Post date:** [October 19, 2018, 1:11pm UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156/7 "2018-10-19T13:11:02Z")

</div>

I followed the official documentation.

### 

Index-level default[edit](https://github.com/elastic/elasticsearch/edit/6.4/docs/reference/mapping/params/ignore-malformed.asciidoc)

The `index.mapping.ignore_malformed` setting can be set on the index level to allow to ignore malformed content globally across all mapping types.

---

<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:** [November 16, 2018, 1:11pm UTC](https://discuss.elastic.co/t/unable-to-put-settings-for-index-template/153156/8 "2018-11-16T13:11:04Z")

</div>

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