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/BooleanFieldMapper.java
public BooleanFieldMapper build(MapperBuilderContext context) {
            MappedFieldType ft = new BooleanFieldType(
                context.buildFullName(name),
                indexed.getValue() && indexCreatedVersion.isLegacyIndexVersion() == false,
                stored.getValue(),
                docValues.getValue(),
                nullValue.getValue(),
                scriptValues(),
                meta.getValue()
            );
            return new BooleanFieldMapper(name, ft, multiFieldsBuilder.build(this, context), copyTo.build(), this);
        }
        private FieldValues<Boolean> scriptValues() {
            if (script.get() == null) {
                return null;
            }
            BooleanFieldScript.Factory scriptFactory = scriptCompiler.compile(script.get(), BooleanFieldScript.CONTEXT);
            return scriptFactory == null
                ? null
                : (lookup, ctx, doc, consumer) -> scriptFactory.newFactory(name, script.get().getParams(), lookup, OnScriptError.FAIL)
                    .newInstance(ctx)
                    .runForDoc(doc, consumer);
        }
    }
    private static final Version MINIMUM_COMPATIBILITY_VERSION = Version.fromString("5.0.0");
    public static final TypeParser PARSER = new TypeParser(
        (n, c) -> new Builder(n, c.scriptCompiler(), c.indexVersionCreated()),
        MINIMUM_COMPATIBILITY_VERSION
    );
    public static final class BooleanFieldType extends TermBasedFieldType {