3 / 3
May 2024

Hello,
Based on the following document:

{ "captions": { "fr": "oui", "en": "yes", "es": "sí" } }

In the captions object, I would like to use static mappings for the fields fr and en with respectively lucene.french and lucene.english. But for all other fields, I don’t know the language codes so the rest is dynamic.
Question: If I use dynamic mapping for captions and static mappings for fr and en, do fr and en will be indexed twice?

Thank you for your help.

No, they will not be indexed twice. A static mapping for a field overrides/replaces what would happen if not specified and the dynamic mapping were used.