# Ignore\_malformed not seeming to work

**URL:** <https://discuss.elastic.co/t/ignore-malformed-not-seeming-to-work/58914>\
**Category:** Elasticsearch\
**Created:** [August 25, 2016, 10:21am UTC](https://discuss.elastic.co/t/ignore-malformed-not-seeming-to-work/58914 "2016-08-25T10:21:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aacb9](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@aacb9](https://discuss.elastic.co/u/aacb9)\
**Post date:** [August 25, 2016, 10:21am UTC](https://discuss.elastic.co/t/ignore-malformed-not-seeming-to-work/58914/1 "2016-08-25T10:21:06Z")

</div>

I have documents that are like:

```auto
{
	"arguments": {
		"foo": 1.23
	}
}

```

```auto
{
	"arguments": {
		"foo": false
	}
}

```

And I'm sending them to type "bar". I have a template for "bar" that I set the the type of "foo" to a double with ignore\_malformed. Yet my documents are still getting mapping failed exceptions  
`MapperParsingException[failed to parse [arguments.foo]]; nested: JsonParseException[Current token (VALUE_FALSE) not numeric, can not use numeric value accessors`

This is my template:

```auto
{
  "template": "bar*",
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
    "bar": {
      "properties": {
        "arguments": {
          "type": "nested",
          "properties": {
            "foo": {
              "type": "double",
              "ignore_malformed": true,
              "null_value": -1
            },
          }
        }
      }
    }
  }
}

```

Is there some dumb setting I'm missing or am I misunderstanding how `ignore_malformed` works?

Also here is output of `_all/_mapping`

```auto
  ".kibana" : {
    "mappings" : {
      "config" : {
        "properties" : {
          "buildNum" : {
            "type" : "string",
            "index" : "not_analyzed"
          }
        }
      }
    }
  },
  "bar-2016.08.25" : {
    "mappings" : {
      "_default_" : {
        "_all" : {
          "enabled" : false
        },
        "dynamic_templates" : [ {
          "nonanalyze_string" : {
            "mapping" : {
              "index" : "not_analyzed",
              "type" : "string"
            },
            "match_mapping_type" : "string"
          }
        }, {
          "integer_to_double" : {
            "mapping" : {
              "index" : "not_analyzed",
              "type" : "double"
            },
            "match_mapping_type" : "integer"
          }
        } ]
      },
      "bar" : {
        "_all" : {
          "enabled" : false
        },
        "dynamic_templates" : [ {
          "nonanalyze_string" : {
            "mapping" : {
              "index" : "not_analyzed",
              "type" : "string"
            },
            "match_mapping_type" : "string"
          }
        }, {
          "integer_to_double" : {
            "mapping" : {
              "index" : "not_analyzed",
              "type" : "double"
            },
            "match_mapping_type" : "integer"
          }
        } ],
        "properties" : {
          "arguments" : {
            "type" : "nested",
            "properties" : {
              "bid_value" : {
                "type" : "double",
                "ignore_malformed" : true,
                "null_value" : -1.0
              }
            }
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [August 25, 2016, 1:15pm UTC](https://discuss.elastic.co/t/ignore-malformed-not-seeming-to-work/58914/2 "2016-08-25T13:15:48Z")

</div>

Looks like a bug to me (The parsing code does not account for this situation where a boolean primitive is passed, only for the case where an arbitrary String is passed) . Can you open an issue on [Github](https://github.com/elastic/elasticsearch/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:** [July 5, 2017, 10:25pm UTC](https://discuss.elastic.co/t/ignore-malformed-not-seeming-to-work/58914/3 "2017-07-05T22:25:13Z")

</div>


