我有很大的文档(每个文档有1000个以上的字段),所以我需要为我的每个索引设置index.mapping.total_fields.limit = 9000。
我可以将全局配置设置为所有索引并更改其默认限制吗?我正在使用elasticsearch js库(但我也可以使用API )
谢谢,拉里
发布于 2018-12-17 08:04:33
您可以做的是使用一个在创建时将应用于所有索引的index template:
PUT _template/common-template
{
"index_patterns": "*", <--- applies to all indices
"order": 10, <--- high order to apply the template last
"settings": {
"index": {
"mapping": {
"total_fields": {
"limit": "9000" <--- this setting will apply to all indices
}
}
}
},
"aliases": {},
"mappings": {
... common mappings go here...
}
}
https://stackoverflow.com/questions/53810947
复制