gpt4 book ai didi

Elasticsearch : How to disable automatic date detection globally for all indices

转载 作者:行者123 更新时间:2023-12-04 11:46:27 25 4
gpt4 key购买 nike

如何在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com