I am running Elasticsearch 2.1.1. I have an Index which is made of a single parent type and multiple child types. I am trying to update a Child mapping by adding a new field. This results in a NullPointerException on the server:
[2016-01-14 10:48:32,354][DEBUG][action.admin.indices.mapping.put] [Philip Fetter] failed to put mappings on indices [[oha_patient_registry]], type [encounters]
java.lang.NullPointerException
at org.elasticsearch.index.mapper.MappedFieldType.checkCompatibility(MappedFieldType.java:246)
at org.elasticsearch.index.mapper.internal.ParentFieldMapper.merge(ParentFieldMapper.java:391)
at org.elasticsearch.index.mapper.Mapping.merge(Mapping.java:113)
at org.elasticsearch.index.mapper.DocumentMapper.merge(DocumentMapper.java:396)
at org.elasticsearch.cluster.metadata.MetaDataMappingService$2.execute(MetaDataMappingService.java:389)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:388)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
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)
In Sense the error is displayed as:
{
"error": {
"root_cause": [
{
"type": "null_pointer_exception",
"reason": null
}
],
"type": "null_pointer_exception",
"reason": null
},
"status": 500
}
Now it is possible that updating Child mappings is not supported, although I didn't get that from the doc... That being said, an error better than a NPE would be expected. Thoughts?
Jeff