I have dynamic templates describing all the fields in my document. If new field is encountered, I want an exception to be thrown. So far this seems possible only by disabling dynamic mapping, or setting it to strict, and manually specifying mapping for all fields, NOT using dynamic templates. However, I really want to use them, cause they provide required level of flexibility and are generally nicer to write/read than usual mapping - especially for documents containing hundreds of different fields. So is there any way this can be achieved?
Oh, to answer my own question with a bit of googling around - it seems, it is not currently possible: https://github.com/elastic/elasticsearch/issues/12358
Nah, you can't have "strict" dynamic