分类 干货 下的文章

兜里的Elasticsearch的索引在创建的时候没注意index.number_of_shards这个大小,结果导致只有一个主分片,使得整个索引最大长度只有2147483519(原因

所以被迫重建索引
这回,先创建一个number_of_shards为2的索引,具体多少取决于你的业务大小

PUT http://'es节点'/'新索引名字'

{
"mappings": {
    "properties": {
        "username": {
            "type": "keyword",
            "index": "true"
        },
        "password": {
            "type": "keyword",
            "index": "true"
        }
    }
},
"settings": {
    "index.number_of_shards": 2
}
}

然后使用reindex api重新索引
POST http://'es节点'/_reindex?wait_for_completion=false

{
  "source": {
    "index": "旧索引名字"
  },
  "dest": {
    "index": "新索引名字"
  }
}

返回一个task id,可以使用
http://'es节点'/_tasks/'task id'
查看任务情况

经测试,效率不行,容易nxdomain
建议coredns使用dns over tls,如果有routeros,可以使用routeros的dot,先决条件是导入ca,然后设置A记录到dot域名用的ip
下次有空再详细写

经实战,国内站点上阿里的dot比腾讯的dot好用,geodns解析正确

附:
阿里 dns.alidns.com
腾讯 dns.pub/doh.pub