es 建索引时指定分片数据和副本数

1指定分片数量  "number_of_shards":8

2指定副本数量   "number_of_replicas" : 1

3指定刷新时间30s,写入数据时,查看到的数据与真实数据有30s的延时   "refresh_interval":"30s"

4禁用_all 字段    "_all":{ "enabled": false}


curl -XDELETE 'http://'${es_node}':9200/index_name'${year_dt}''

curl -XPUT 'http://'${es_node}':9200/index_name'${year_dt}'?pretty' -H 'Content-Type: application/json' -d'
{
 "settings" : {
        "number_of_shards":8,
        "number_of_replicas" : 1,
        "refresh_interval":"30s"
    },
    "mappings" : {
      "type_name":{
    "properties":{
        "bill_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "opupk":{
            "type":"string",
            "index":"not_analyzed"
        },
        "invoice_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "customer_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "zone_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "vip_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "vip_zone_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "bukrs":{
            "type":"string",
            "index":"not_analyzed"
        },
        "bill_period":{
            "type":"string",
            "index":"not_analyzed"
        },
        "payment_term":{
            "type":"string",
            "index":"not_analyzed"
        },
        "payment_due_dt":{
            "type":"string",
            "index":"not_analyzed"
        },
        "vktyp":{
            "type":"string",
            "index":"not_analyzed"
        },
        "fee_amt1":{
            "type":"string",
            "index":"not_analyzed"
        },
        "currency_code1":{
            "type":"string",
            "index":"not_analyzed"
        },
        "fee_amt2":{
            "type":"string",
            "index":"not_analyzed"
        },
        "currency_code2":{
            "type":"string",
            "index":"not_analyzed"
        },
        "receipt_batch_number":{
            "type":"string",
            "index":"not_analyzed"
        },
        "bu_type":{
            "type":"string",
            "index":"not_analyzed"
        },
        "unique_id":{
            "type":"string",
            "index":"not_analyzed"
        },
        "bg_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "depart":{
            "type":"string",
            "index":"not_analyzed"
        },
        "charge_item_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "region_type_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "tax_rule_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "kostl":{
            "type":"string",
            "index":"not_analyzed"
        },
        "geber":{
            "type":"string",
            "index":"not_analyzed"
        },
        "partner_zone_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "partner_bg_code":{
            "type":"string",
            "index":"not_analyzed"
        },
        "partner_bukrs":{
            "type":"string",
            "index":"not_analyzed"
        },
        "original_gl_dt":{
            "type":"string",
            "index":"not_analyzed"
        },
        "zzcustom_01":{
            "type":"string",
            "index":"not_analyzed"
        },
        "zzcustom_02":{
            "type":"string",
            "index":"not_analyzed"
        },
        "zzcustom_03":{
            "type":"string",
            "index":"not_analyzed"
        },
        "zzcustom_04":{
            "type":"string",
            "index":"not_analyzed"
        },
        "zzcustom_05":{
            "type":"string",
            "index":"not_analyzed"
        },
        "batch_no":{
            "type":"string",
            "index":"not_analyzed"
        },
        "caculate_dt":{
            "type":"string",
            "index":"not_analyzed"
        },
        "rebate_begin_dt":{
            "type":"string",
            "index":"not_analyzed"
        },
        "rebate_end_dt":{
            "type":"string",
            "index":"not_analyzed"
        },
        "bill_end_inv_flg":{
            "type":"string",
            "index":"not_analyzed"
        },
        "invoice_type":{
            "type":"string",
            "index":"not_analyzed"
        },
        "create_tm":{
            "type":"string",
            "index":"not_analyzed"
        }
        },
                "_all":{ "enabled": false}
                }
    }
}';
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值