问题
建立索引要 建立数据分片 否则 会出现 报错原因是 all shards failed
PUT /student { "mappings": { "properties": { "name":{ "type": "text", "analyzer": "ik_smart" }, "age":{ "type": "keyword", "index": true } } }, "settings": { "number_of_shards": 3, "number_of_replicas": 1 } }
number_of_shards 主分片 是3
number_of_replicas 副本是 1 , 主分片的 副本数量 是 3*1
index 要设置 为true
浙公网安备 33010602011771号