Data type of the internal fields of JSON property changes

Hi,

I am indexing the data in which one of the document fields is JSON. I mapped this as an object in the data-mapping and I am able to index and search this JSON from Kibana. But in some of the records or documents, the data type of the fields inside the JSON are different.

Ex: 1 Rec or Doc - JSON property is scratchpad : and scratchpad.input.f1 => is a string
2 Rec or Doc - scratchpad.input.f1 => is a object

When this data is given as input to index, 1 Rec is indexed, But 2nd Rec index failed because elastic is expecting "scratchpad.input.f1" as a string, but found an object.

Is there anyway to ignore these mismatch of the data type of the internal fields across docs ? Still maintaining JSON search capability after index.

Any help is much appreciated.

Regards,
Tirumala Reddy

Hey,

see the ignore_malformed option in the elasticsearch docs.

--Alex