The `ignore_malformed` option is supported by a few of our field types, mainly numerics and dates, to still accept the document when such fields hold malformed values. See https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-malformed.html. Also `ignore_malformed` is an index level setting that gets applied to all field types that support it. 

The boolean field type does not support `ignore_malformed` but it should, so that if a boolean field cannot be parsed as a boolean, the document can still be accepted.


server/src/main/java/org/elasticsearch/index/mapper/DynamicFieldsBuilder.java
() -> strategy.newDynamicLongField(context, name)
                );
            } else if (numberType == XContentParser.NumberType.FLOAT
                || numberType == XContentParser.NumberType.DOUBLE
                || numberType == XContentParser.NumberType.BIG_DECIMAL) {
                    createDynamicField(
                        context,
                        name,
                        DynamicTemplate.XContentFieldType.DOUBLE,
                        () -> strategy.newDynamicDoubleField(context, name)
                    );
                } else {
                    throw new IllegalStateException("Unable to parse number of type [" + numberType + "]");
                }
        } else if (token == XContentParser.Token.VALUE_BOOLEAN) {
            createDynamicField(
                context,
                name,
                DynamicTemplate.XContentFieldType.BOOLEAN,
                () -> strategy.newDynamicBooleanField(context, name)
            );
        } else if (token == XContentParser.Token.VALUE_EMBEDDED_OBJECT) {
            
            createDynamicField(
                context,
                name,
                DynamicTemplate.XContentFieldType.BINARY,
                () -> CONCRETE.newDynamicBinaryField(context, name)
            );
        } else {