Unable to put settings for Index template

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

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

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.:):upside_down_face:

Thanks,
Pras

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 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!

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

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.

I followed the official documentation.

Index-level defaultedit

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

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