我想配置 synonym
用于索引;通过 Elasticvue
我运行这个:
HTTP method : PUT , Path : /my_index
Request body :
{
"settings": {
"index": {
"analysis": {
"analyzer": {
"synonym": {
"tokenizer": "whitespace",
"filter": [
"synonym"
]
}
},
"filter": {
"synonym": {
"type": "synonym",
"synonyms_path": "synonym.txt"
}
}
}
}
}
}
结果:
{
"error": {
"root_cause": [
{
"type": "resource_already_exists_exception",
"reason": "index [my_index/F5AydksvQy2hzXNV1BnyWg] already exists",
"index_uuid": "F5AydksvQy2hzXNV1BnyWg",
"index": "my_index"
}
],
"type": "resource_already_exists_exception",
"reason": "index [my_index/F5AydksvQy2hzXNV1BnyWg] already exists",
"index_uuid": "F5AydksvQy2hzXNV1BnyWg",
"index": "my_index"
},
"status": 400
}
那么如何解决这个问题呢?
1条答案
按热度按时间tzxcd3kk1#
首先需要删除索引,然后使用新的索引设置再次创建索引。
你得到了错误
resource_already_exists_exception
因为您试图在旧索引仍然存在的情况下创建索引。