这是因为该analysis
部分直接进入settings
而不进行settings > index
.
您可以像这样重新创建索引,它将起作用:
curl -XPUT 'http://mycluster/dsi2' -d '{ "settings": { "index": { "number_of_shards": 1, "number_of_replicas": 1 }, "analysis": { "analyzer": { "analyzer_keyword": { "tokenizer": "keyword", "filter": "lowercase" } } } } }