How to set default mapping to “keyword” for dynamically added properties in Elasticsearch

 ̄綄美尐妖づ 提交于 2021-02-11 15:31:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!