问题
In our application we add new documents which can have new unknown properties.
Is it possible to set default mapping to "keyword" for dynamically added new properties in Elasticsearch?
回答1:
Dynamic template doc has an example for type string. Also in case you don't already use index templates read the relevant doc as the dynamic template can be specify with CREATE INDEX API but more commonly in the index template
回答2:
This, this, and this should be enough to get you started. When in doubt, please ask a more specific question.
来源:https://stackoverflow.com/questions/62937039/how-to-set-default-mapping-to-keyword-for-dynamically-added-properties-in-elas