elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.53k stars 24.61k forks source link

Synthetic source support for objects with nested unmapped fields #106825

Open salvatore-campagna opened 5 months ago

salvatore-campagna commented 5 months ago

Description

Synthetic source is still missing support for the Object field type. Supporting it when enabled: false is already addresses by #106460 by having a stored field storing the whole json blob as is. Anyway, we need to support synthetic source reconstruction of the field also when enabled: true.

When that is the case it means we can have mapped or unmapped sub-fields which might be of any type and we are missing support for object fields including unmapped fields. We need to delegate to the corresponding nested mapper created by the dynamic mapping logic if the field was dynamically mapped or by storing the json value "as-is" if the mapping didn't happen because the number of dynamically mapped fields was already above the limit.

elasticsearchmachine commented 5 months ago

Pinging @elastic/es-storage-engine (Team:StorageEngine)