Feature request: report the expected mapping type on every mapping_exception #31502
Labels
help wanted
adoptme
:Search Foundations/Mapping
Index mappings, including merging and defining field types
Team:Search Foundations
Meta label for the Search Foundations team in Elasticsearch
Hi,
As part of our product, we're indexing our customer's data on elasticsearch clusters. For this reason, we cannot control the mapping types of each source, and cannot prevent mapping_exceptions from occurring. For each mapping_exception we're modifying the original document to avoid dataloss.
Currently, this is a difficult task, as elasticsearch does not report which mapping type is expected upon an exception - but only the field name that caused the exception within the indexed document; e.g.
There is one exception to this rule, which is when dealing with objects; e.g., when indexing a concrete value into a field with mapping_type of object:
Or when indexing a nested object into a concrete value:
The two exceptions above make it much easier to actually handle the exception and prevent dataloss. I'd like to suggest adding the expected mapping type for all mapping exceptions.
The text was updated successfully, but these errors were encountered: