# \[1.5\] BulkInsert and mapping erased

**URL:** <https://discuss.elastic.co/t/1-5-bulkinsert-and-mapping-erased/54737>\
**Category:** Elasticsearch\
**Created:** [July 5, 2016, 1:13pm UTC](https://discuss.elastic.co/t/1-5-bulkinsert-and-mapping-erased/54737 "2016-07-05T13:13:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ugo\_Bourdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ugo_bourdon/32/10725_2.png) [@Ugo\_Bourdon](https://discuss.elastic.co/u/Ugo_Bourdon)\
**Post date:** [July 5, 2016, 1:13pm UTC](https://discuss.elastic.co/t/1-5-bulkinsert-and-mapping-erased/54737/1 "2016-07-05T13:13:05Z")

</div>

Hi,

I perform some bulk insert for one type of document, but sometimes (not always reproductible) the mapping i set at the creation of the index is erased and I have some read error after that because elastic client looking for precise type and don't find it (nested type).  
Have you an idea about this kind of stuff ?

Thx for your response.

---

<div class="post-metadata">

**Author:** ![Ugo\_Bourdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ugo_bourdon/32/10725_2.png) [@Ugo\_Bourdon](https://discuss.elastic.co/u/Ugo_Bourdon)\
**Post date:** [July 5, 2016, 1:16pm UTC](https://discuss.elastic.co/t/1-5-bulkinsert-and-mapping-erased/54737/2 "2016-07-05T13:16:09Z")

</div>

I find this logs, i'm not sure to understand.

`[2016-07-05 12:50:34,617][DEBUG][action.admin.indices.mapping.put] [AnstelPreprod] failed to put mappings on indices [[perf_immo_dev_idxtickets]], type [ticket] org.elasticsearch.index.mapper.MergeMappingException: Merge failed with failures {[mapper [agency.uid] has different index values, mapper [agency.uid] has different tokenize values, mapper [agency.uid] has different index_analyzer, mapper [uid] has different index_analyzer, object mapping [providers] can't be changed from non-nested to nested]} at org.elasticsearch.cluster.metadata.MetaDataMappingService$4.execute(MetaDataMappingService.java:511) at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:365) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:188) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:158) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) [2016-07-05 12:50:34,634][INFO][cluster.metadata] [AnstelPreprod] [perf_immo_dev_idxtickets] update_mapping [ticket] (dynamic) [2016-07-05 12:52:34,036][DEBUG][action.search.type] [AnstelPreprod] [perf_immo_dev_idxtickets][4], node[HwDpgrdVTtW5NoRH9lL42A], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3eae7616] lastShard [true] org.elasticsearch.search.aggregations.AggregationExecutionException: [nested] nested path [providers] is not nested at org.elasticsearch.search.aggregations.bucket.nested.NestedAggregator$Factory.create(NestedAggregator.java:178) at org.elasticsearch.search.aggregations.AggregatorFactories.createAndRegisterContextAware(AggregatorFactories.java:53) at org.elasticsearch.search.aggregations.AggregatorFactories.createTopLevelAggregators(AggregatorFactories.java:157) at org.elasticsearch.search.aggregations.AggregationPhase.preProcess(AggregationPhase.java:79) at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:100) at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:286) at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:297) at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231) at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228) at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)`

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2016, 8:51pm UTC](https://discuss.elastic.co/t/1-5-bulkinsert-and-mapping-erased/54737/3 "2016-07-05T20:51:59Z")

</div>

You have conflicting mappings within fields.  
Check your ingestion process to make sure it's not changing things.

---

<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:37pm UTC](https://discuss.elastic.co/t/1-5-bulkinsert-and-mapping-erased/54737/4 "2017-07-05T22:37:48Z")

</div>


