I have documents that are like:
{
"arguments": {
"foo": 1.23
}
}
{
"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:
{
"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
".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
}
}
}
}
}
}
}
}