You can disbale the automatic creation of the mapping in the configs, like mentioned in the documentation.
Just set action.auto_create_index
to false
.
The field names can not be case-insensitive, since the naming belongs to you. I would suggest to only use lowercase for that. However, you can search in your values case-insensitive.
EDIT:
Like @javanna's comment says, this does not disable the dynamic mapping.
Therefore, you have to set index.mapper.dynamic
to false
.
As a result, non declared fields will be ignored.
If you want elasticsearch to throw an error instead, you have to set it to strict
.