Is your feature request related to a problem? Please describe.
Currently it is possible to set dynamic: "strict" which prevents adding fields that do not have a static mapping in the "properties" but it also disables usage of dynamic_templates.
Option like "dynamic": "templates" which allows the date__created and url but disallows the bad field would be really useful to avoid accidental data in the index.
Describe alternatives you've considered
There's a hacky workaround. One can map any remaining fields to a "broken mapping"
Is your feature request related to a problem? Please describe.
Currently it is possible to set
dynamic: "strict"
which prevents adding fields that do not have a static mapping in the "properties" but it also disables usage ofdynamic_templates
.For example
This will disallow documents like
while allowing
but it does not allow
which is unfortunate 😞
Describe the solution you'd like
Option like
"dynamic": "templates"
which allows thedate__created
andurl
but disallows thebad
field would be really useful to avoid accidental data in the index.Describe alternatives you've considered
There's a hacky workaround. One can map any remaining fields to a "broken mapping"
And this works like described but emits bit weird error messages.