elasticsearch - elasticsearch total_fields.limit 作为全局
问题描述
我有大型文档(每个文档中有超过 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...
}
}
推荐阅读
- java - 调用存储库上下文中的 Micronaut 错误不包含密钥:io.micronaut.tx.STATUS
- selenium - ActionChains 不起作用,除非我手动刷新 selenium 浏览器
- javascript - 如何使用 Javascript 在屏幕上显示十六进制代码值?
- node.js - 我可以使用 Google Cloud Scheduler 备份我的 MongoDB Atlas 集合吗?
- robotframework - 在 Robot Framework 和 Pabot 中获取记录的变量
- routes - ststic 路由 kerio 控制
- mysql - 错误:XAMPP SERVER 中的 MySQL 意外关闭
- javascript - 提升状态后向当前组件添加路由
- python - 音频文件无法读取为 PCM WAV、AIFF/AIFF-C 或 Native FLAC;检查文件是否损坏或其他格式/语音到文本视图python
- c++ - Karatsuba 与字符串 C++ 的乘法