Ignore malformed field when dynamic: strict

I need to have dynamic:strict in my mapping because I have malformed JSON.
I need to ignore malformed fields for example: (first normal field and secondly malformed)
{
key1: value1
}
{
key which is 1: value1
}
"key which is 1" is a malformed field which occurs through dependencies and I cannot change it. It get's parsed because I parse k,v with '='
How can I ignore field: "key which is 1" in my index?
If I cannot simply ignore it, elasticsearch rejects the whole document. Which cannot happen. It should index document except this field.
I will be able to set the field before it is indexed because of "dynamic":"strict

Would you be able to send the bad JSON through an ingest node? If so, you can ignore the bad stuff via the JSON processor.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.