# Field missing in explicit mapping causes import error

**URL:** <https://discuss.elastic.co/t/field-missing-in-explicit-mapping-causes-import-error/75017>\
**Category:** Elasticsearch\
**Created:** [February 14, 2017, 11:20am UTC](https://discuss.elastic.co/t/field-missing-in-explicit-mapping-causes-import-error/75017 "2017-02-14T11:20:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Bullock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew_bullock/32/47550_2.png) [@Matthew\_Bullock](https://discuss.elastic.co/u/Matthew_Bullock)\
**Post date:** [February 14, 2017, 11:20am UTC](https://discuss.elastic.co/t/field-missing-in-explicit-mapping-causes-import-error/75017/1 "2017-02-14T11:20:52Z")

</div>

Hi i have explicitly defined a filed in my mapping to force it as a keyword.

I use the Bulk API to import the data

However some cases this field in not present in the imported data. This causes an import error and and the data is skipped even though the other fields contain data.

Is there a way of importing the rest of the data even though one field is missing from time to time.

---

<div class="post-metadata">

**Author:** ![tanguy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanguy/32/6030_2.png) [@tanguy](https://discuss.elastic.co/u/tanguy)\
**Post date:** [February 14, 2017, 12:31pm UTC](https://discuss.elastic.co/t/field-missing-in-explicit-mapping-causes-import-error/75017/2 "2017-02-14T12:31:12Z")

</div>

Hi,

Can you please share the import error log with us? A missing field should not prevent the document to be indexed, but a value in the wrong datatype can (like indexing a string/text where a number is expected).

Also, you might be interested in the ignore\_malformed setting:  
[https://www.elastic.co/guide/en/elasticsearch/reference/5.2/ignore-malformed.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/ignore-malformed.html)

---

<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:** [March 14, 2017, 12:31pm UTC](https://discuss.elastic.co/t/field-missing-in-explicit-mapping-causes-import-error/75017/3 "2017-03-14T12:31:26Z")

</div>

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