# Data type of the internal fields of JSON property changes

**URL:** <https://discuss.elastic.co/t/data-type-of-the-internal-fields-of-json-property-changes/59829>\
**Category:** Elasticsearch\
**Created:** [September 5, 2016, 4:17pm UTC](https://discuss.elastic.co/t/data-type-of-the-internal-fields-of-json-property-changes/59829 "2016-09-05T16:17:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tirumala55](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@Tirumala55](https://discuss.elastic.co/u/Tirumala55)\
**Post date:** [September 5, 2016, 4:17pm UTC](https://discuss.elastic.co/t/data-type-of-the-internal-fields-of-json-property-changes/59829/1 "2016-09-05T16:17:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 9, 2016, 11:32am UTC](https://discuss.elastic.co/t/data-type-of-the-internal-fields-of-json-property-changes/59829/2 "2016-09-09T11:32:37Z")

</div>

Hey,

see the [`ignore_malformed`](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/ignore-malformed.html) option in the elasticsearch docs.

--Alex

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:21pm UTC](https://discuss.elastic.co/t/data-type-of-the-internal-fields-of-json-property-changes/59829/3 "2017-07-05T22:21:33Z")

</div>


