[1.5] BulkInsert and mapping erased

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.

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)

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