问题:
下面这个报错,是在配置同义词的时候报的错:不能识别南京。
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "failed to build synonyms"
}
],
"type": "illegal_argument_exception",
"reason": "failed to build synonyms",
"caused_by": {
"type": "parse_exception",
"reason": "Invalid synonym rule at line 1",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "term: 南京 was completely eliminated by analyzer"
}
}
},
"status": 400
}
解决方式:
这是因为我在停止词里面配置“南京”这个词导致的。删除停止词库中的“南京”或者去除对应的同义词皆可。