Elasticsearch(ES)マッピングのルーティングを明示的に無効にしました:
{
"chow-clfg": {
"_parent": {
"type": "chow-demo"
},
"_routing": {
"required": false
},
"_id": {
"path": "clfg"
},
"dynamic": "true",
"_ttl": {
"enabled": true,
"default": "1h"
},
"properties": {
"clfg": {
"analyzer": "keyword",
"type": "string"
},
"@timestamp": {
"format": "dateOptionalTime",
"type": "date"
},
"count": {
"type": "long"
}
}
}
}
curlコマンドを実行して新しいマッピングを削除および更新した後も、_cluster/stateコマンドを実行するとルーティングが有効になります。
"mappings" : {
"chow-clfg" : {
"_id" : {
"path" : "clfg"
},
"_routing" : {
"required" : true
},
"_ttl" : {
"enabled" : true,
"default" : 3600000
},
"properties" : {
"@timestamp" : {
"format" : "dateOptionalTime",
"type" : "date"
},
"clfg" : {
"analyzer" : "keyword",
"type" : "string"
},
"count" : {
"type" : "long"
}
},
"_parent" : {
"type" : "chow-demo"
}
}
したがって、次の質問が残ります。
- 親/子マッピングに必要な要件ではない場合、ルーティングを無効にするにはどうすればよいですか?
- ルーティングが必要な場合、一意ではないフィールドでルーティングを実行できますか?