zoukankan      html  css  js  c++  java
  • ES7 中对索引指定副本和分片数

    个人学习笔记,谢绝转载!!!

    原文:https://www.cnblogs.com/wshenjin/p/15156235.html


    1、创建索引时指定

    PUT /nginx-logs {
        "settings": {
            "number_of_shards":3,
            "number_of_replicas":1
       }
    }
    

    2、通过模板
    新建一个template_nginx_logs的模板,匹配nginx-log-开头的索引,并配置副本数和分片数

    PUT /_template/template_nginx_logs' { 
        "index_patterns" : ["nginx-log-*"], 
        "settings":{
            "number_of_shards":3,
            "number_of_replicas":1
        }
    }
    
  • 相关阅读:
    405
    406
    4-1
    3-11
    3-10
    3-9
    3-8
    3-7
    3-5
    3-4
  • 原文地址:https://www.cnblogs.com/wshenjin/p/15156235.html
Copyright © 2011-2022 走看看