作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何在 elasticsearch 中全局禁用所有索引的自动检测?我发现可以通过动态映射禁用单个索引(来源:https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-field-mapping.html)
但我想通过 elasticsearch.yml 中的一些命令全局执行此操作。有没有办法做到这一点?
最佳答案
我已经通过更改全局 Elasticsearch 模板解决了它(检查,如果您已经在全局模板中有任何重要的设置,您想保留,那么您还需要将它们复制粘贴到 json 中):
curl -X PUT "$HOSTNAME:9200/_template/global?pretty" -H 'Content-Type: application/json' -d'
{
"index_patterns" : ["logstash-*"], ####here your index pattern for the setting####
"order" : 0,
"mappings": {
"doc": {
"date_detection": false
}
}
}'
关于 Elasticsearch : How to disable automatic date detection globally for all indices,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52372923/
我是一名优秀的程序员,十分优秀!