Hi i m trying to use synonym file in ES 2.3.4.
from the documentation i used the following command in SENSE:
POST /mise/
{
"index" : {
"analysis" : {
"analyzer" : {
"synonym" : {
"tokenizer" : "whitespace",
"filter" : ["synonym"]
}
},
"filter" : {
"synonym" : {
"type" : "synonym",
"synonyms_path" : "sinonimi/synonym.txt"
}
}
}
}
}
I want all thje synonyms to be equivalent. Below my synonym.txt file format:
"abate,priore,superiore",
"abbacchiare,avvilire,deprimere",
"abbacchiarsi,abbattersi,abbiosciarsi,accasciarsi,avvilirsi,deprimersi,disperarsi,scoraggiarsi,sgomentarsi",
"abbacchiato,abbattuto,accasciato,afflitto,affranto,annientato,costernato,demoralizzato,depresso,in crisi,infelice,malinconico,mogio,prostrato,sconfortato,scoraggiato,scorato,sfiduciato,triste",
"abbacchio,agnello"
I get the following error message:
{
"error": {
"root_cause": [
{
"type": "index_creation_exception",
"reason": "failed to create index"
}
],
"type": "illegal_argument_exception",
"reason": "failed to build synonyms",
"caused_by": {
"type": "malformed_input_exception",
"reason": "Input length = 1"
}
},
"status": 400
}
Could you please help me out?
Cannot get around this issue.
Thanx valerio