Hi team,
We tried to find the root cause of an exception while using synonyms.
This is the synonym filter:
"japanese_index_synonym": {
"type": "synonym_graph",
"lenient": false,
"synonyms": [
"kfc,ケンタ,ケンタッキーフライドチキン"
]
},
We have ONLY this filter in the analyzer we're using for indexing (I tried using it only for searching analyzer, it throws the same exception.)
This is the error message I see:
{
"error": {
"root_cause": [
{
"type": "remote_transport_exception",
"reason": "[BssdTVj][x.x.x.x:9300][indices:admin/create]"
}
],
"type": "illegal_argument_exception",
"reason": "failed to build synonyms",
"caused_by": {
"type": "parse_exception",
"reason": "parse_exception: Invalid synonym rule at line 1",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "term: ケンタッキーフライドチキン analyzed to a token (ケンタッキーフライドチキン) with position increment != 1 (got: 0)"
}
}
},
"status": 400
}
The thing I found about this ケンタッキーフライドチキン
(KFC's japanese name) is that
{
"token": "ケンタッキーフライドチキン",
"start_offset": 0,
"end_offset": 13,
"type": "word",
"position": 0,
"positionLength": 2
}
because it's 名詞-固有名詞-組織
(a specific company name).
How shall we resolve this exception? Thank you so much!