一、指定多个索引,如下所示当创建名称包含filebeat-、test-、dev-、prod-命名的索引指定索引规则为1个分片,0副本

curl -XPUT 'http://localhost:9200/_template/template_http_request_record' -H 'Content-Type: application/json' -d '{"index_patterns": ["filebeat-*","test-*","dev-*","prod-*"],"settings": {"number_of_shards": 1,"number_of_replicas": 0}}'

通过cerebro查询可以看到默认的模板已经变更

ElasticSearch7.5.2通过模板管理索引副本数、分片

相关文章:

  • 2022-12-23
  • 2022-02-07
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
猜你喜欢
  • 2021-06-18
  • 2021-09-24
  • 2021-09-02
  • 2021-08-05
  • 2022-12-23
  • 2021-12-29
  • 2021-06-18
相关资源
相似解决方案