# Ignore\_malformed doesn't work?

**URL:** <https://discuss.elastic.co/t/ignore-malformed-doesnt-work/96793>\
**Category:** Elasticsearch\
**Created:** [August 11, 2017, 3:18pm UTC](https://discuss.elastic.co/t/ignore-malformed-doesnt-work/96793 "2017-08-11T15:18:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![djmcgreal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djmcgreal/32/52956_2.png) [@djmcgreal](https://discuss.elastic.co/u/djmcgreal)\
**Post date:** [August 11, 2017, 3:18pm UTC](https://discuss.elastic.co/t/ignore-malformed-doesnt-work/96793/1 "2017-08-11T15:18:38Z")

</div>

Hi,  
I'm using 5.2.2 and have set my index's settings.index.mapping.ignore\_malformed to true (I have verified this) and yet when I index a document I get a document rejected because it tries to put an object where it's expecting a string.

Does ignore\_malformed only work for some cases?

Best, Dan.

---

<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:** [August 14, 2017, 7:29am UTC](https://discuss.elastic.co/t/ignore-malformed-doesnt-work/96793/2 "2017-08-14T07:29:06Z")

</div>

Hey,

indeed it currently only works, if you specify a field that does not contain an inner field, but just a different type. There is already an issue about this [https://github.com/elastic/elasticsearch/issues/12366](https://github.com/elastic/elasticsearch/issues/12366)

You should be able to work around this by setting `object: false` (but this needs to be done on a per-field base).

--Alex

---

<div class="post-metadata">

**Author:** ![djmcgreal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djmcgreal/32/52956_2.png) [@djmcgreal](https://discuss.elastic.co/u/djmcgreal)\
**Post date:** [August 14, 2017, 2:49pm UTC](https://discuss.elastic.co/t/ignore-malformed-doesnt-work/96793/3 "2017-08-14T14:49:57Z")

</div>

Thanks!

---

<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:** [September 11, 2017, 2:49pm UTC](https://discuss.elastic.co/t/ignore-malformed-doesnt-work/96793/4 "2017-09-11T14:49:58Z")

</div>

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