我有大文档(每个文档中有超过 1000 个字段)所以我需要为我的每个索引设置 index.mapping.total_fields.limit = 9000,
我可以为所有索引设置全局配置并更改它们的默认限制吗?我使用的是 elasticsearch js 库,(但我也可以使用 API)
谢谢,拉里
您可以做的是使用一个索引模板,该模板将在创建时应用于所有索引:
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...
}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句