Hi Everyone ,
i'm a beginner in ElasticSearch, i have an application that use elasticSearch to look for ingredients in a given food or fruit...
i'm facing a problem with scoring if the user for example tape : "Vitamine d"
ElasticSearch will give the "vitamine" phrase that have the best scoring even if the phrase "Vitamine D" exist and normally it should have the highest score.
i see that if the second word "d" in my case is just one letter so elastic search will ignore it.
i did another example : "vitamine b12" and i had the correct score .
here is the query that the application send to the server :
{
"from": 0,
"size": 5,
"query": {
"bool": {
"must": [
{
"match": {
"constNomFr": {
"query": "vitamine d"
}
}
}
],
"should": [
{
"prefix": {
"constNomFr": {
"value": "vitamine d",
"boost": 2
}
}
}
]
}
},
"_source": {
"excludes": [
"alimentDtos"
]
}
}
What i could modify to make it work ?
thank you so much