Hello,
I defined synonyms in my txt file : canapé, banquette, poof
When I launch this command : curl -XGET '
http://127.0.0.1:9200/my_index/_analyze?pretty=1&text=poof&analyzer=default',
i have my synonyms :
{
"tokens" : [ {
"token" : "canapé",
"start_offset" : 0,
"end_offset" : 4,
"type" : "SYNONYM",
"position" : 1
}, {
"token" : "banquette",
"start_offset" : 0,
"end_offset" : 4,
"type" : "SYNONYM",
"position" : 1
}, {
"token" : "poof",
"start_offset" : 0,
"end_offset" : 4,
"type" : "SYNONYM",
"position" : 1
} ]
}
But, when I do a research, I only have the documents that contain the word
"canapé". I don't have the documents that contain the words "poof" and
"banquette" (3 hits over 5)
curl -XGET 'http://127.0.0.1:9200/testavecparam/products/_search?pretty=1'
-d '
{
"query" : {
"text" : {
"products.designation" : {
"query" : "canape",
"analyzer" : "default"
}
}
}
}
'
My configuration :
"settings" : {
"analysis" : {
"analyzer" : {
"default" : {
"type" : "custom",
"tokenizer" : "standard"
"filter" : [
"standard",
"lowercase",
"myStemmer",
"asciifolding",
"mySynonym"
],
}
}
"filter" : {
"myStemmer" : {
"type" : "stemmer",
"language" : "light_french"
}
"mySynonym" : {
"type" : "synonym",
"synonyms_path" : "analysis/synonym.txt"
}
},
}
}
Is there any problem with my configuration?
Thanks for your answers