Elasticsearch

来源:互联网 发布:cfca 网络身份认证平台 编辑:程序博客网 时间:2024/06/09 17:04

基本配置

script.engine.groovy.inline.update: on

script.engine.groovy.inline.aggs: on
index.mapper.dynamic: true
index.query.bool.max_clause_count: 3000
cluster.name: zjlp-es-cluster
node.name: zjlp-es-node-01
path.data: /opt/es/elasticsearch-data/data
path.logs: /opt/es/elasticsearch-data/logs
network.host: 192.168.0.151

discovery.zen.ping.unicast.hosts: ["Master", "Slave1","Slave2","Slave3"]


mapping:

es_host="192.168.175.11:9200"
curl -XDELETE ${es_host}'/relation'
curl -XPUT ${es_host}'/relation' -d '{
    "settings" : {
        "index" : {
            "number_of_shards" : 60,
            "number_of_replicas" : 0
        }
    },
    "mappings": {
        "docs": {
           "_all" : {
              "enabled" : false
            },
            "properties": {
                "username": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                "userId": {
                    "type": "long",
                    "index": "not_analyzed"
                },
                "friendType": {
                    "type": "integer",
                     "index": "not_analyzed"
                }
            }
        }
    }
}'

0 0
原创粉丝点击