In your specific case, the type "object" is explicitly excluded from the use of ignore_malformed, which would be a common approach in these cases.
I guess you could try to use ingest pipelines to tidy up any bad input data ... often better to try to "fix" this sort of issue at source (excuse the pun).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.