# Logstash-\>ES 7.5.0 import fails because of doc\_as\_upsert

**URL:** <https://discuss.elastic.co/t/logstash-es-7-5-0-import-fails-because-of-doc-as-upsert/212499>\
**Category:** Logstash\
**Created:** [December 19, 2019, 1:28pm UTC](https://discuss.elastic.co/t/logstash-es-7-5-0-import-fails-because-of-doc-as-upsert/212499 "2019-12-19T13:28:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michalz](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@michalz](https://discuss.elastic.co/u/michalz)\
**Post date:** [December 19, 2019, 1:28pm UTC](https://discuss.elastic.co/t/logstash-es-7-5-0-import-fails-because-of-doc-as-upsert/212499/1 "2019-12-19T13:28:17Z")

</div>

I try to import data from couchDb using Logstash (7.5.0) to Elasticsearch (7.5.0).  
When defining a Mapping in ES, I select "dynamic" = "strict"  
and in my elasticsearch output plugin I have:  
document\_id =\> "%{[@metadata][\_id]}"  
action =\> "update"  
doc\_as\_upsert =\> "true".  
Yet, ES complains that this is not in the Mapping and that dynamic mapping should be disabled.  
It works when I select "dynamic":"false" but with this setting can I be sure that Logstash will always try to upsert data and not create multiple duplicates? As I understand, with "dynamic":"false" in the Mapping definition, the field "doc\_as\_upsert" is ignored when inserting into the database. Does Logstash only perform upserting then? (Merge not create a copy).

---

<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:** [January 16, 2020, 1:28pm UTC](https://discuss.elastic.co/t/logstash-es-7-5-0-import-fails-because-of-doc-as-upsert/212499/2 "2020-01-16T13:28:29Z")

</div>

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