Mapping elasticsearch

hello
is there a way to make elasticsearch store a field (which is not declared in the mapping) by default with type keyword instead of text ?

You may need to use a dynamic mapping template