zoukankan      html  css  js  c++  java
  • ElasticSearch设置索引全局默认分片

    设置全局分片数量:
    put http://196.168.137.100:9200/_template/template_http_request_record
    {
    “index_patterns”: ["*"],
    “settings”: {
    “number_of_shards”: 5,
    “number_of_replicas”: 1
    }
    }
    指定创建索引时的分片数量:
    put http://196.168.137.100:9200/<索引名称>
    {
    “settings”: {
    “number_of_shards”: 5,
    “number_of_replicas”: 1
    }
    }

    linux 命令执行
    curl -XPUT 'http://xxxxx:9200/_template/template_http_request_record'
       -H 'Content-Type: application/json' -d
      '{"index_patterns": ["*"],"settings": {"number_of_shards": 1,"number_of_replicas": 0}}'
    具体json 
    执行的接口

    _template/template_http_request_record

    参数

    {
      "index_patterns": ["*"],  #这个是作用于索引匹配
      "settings": {  #配置信息
         "number_of_shards": 1,
         "number_of_replicas": 0 # 备份数量
      }
    }

  • 相关阅读:
    scapy--初识
    python--re(匹配字符串)
    python--pdb
    Fedora 配置
    Ubuntu 18.04 配置
    python--git
    python--os
    day28 Pyhton 面向对象 继承
    day28 Pyhton MRO和C3算法
    数学知识回顾02
  • 原文地址:https://www.cnblogs.com/cheyunhua/p/14694496.html
Copyright © 2011-2022 走看看