I have defined a autocomplete index like
{
"mappings": {
"dynamic": false,
"fields": {
"presentationSeries": {
"fields": {
"title": {
"analyzer": "lucene.danish",
"type": "autocomplete"
}
},
"type": "document"
}
}
}
}
And run a aggregation search like
[{$search: {
index: 'season-title',
autocomplete: {
query: 'deadline*',
path: 'presentationSeries.title'
}
}}, {$project: {
_id: 0,
presentationSeriesId: "$_id",
title: "$presentationSeries.title",
score: {
"$meta": "searchScore"
}
}}]
when running this agains documents where presentationSeries.title is “deadline” a 100% equality is present so i would expect the searchScore to be higher than a partial match. Eg
full match →
{
"title": "Deadline",
"seasonId": "751967870000",
"seriesId": "756177704000",
"score": 4.8309083
}
partial match->
{
"title": "Deadline 17:00",
"seasonId": "751946357000",
"seriesId": "756177704000",
"score": 5.6943293
}
When sorting on score the full match is shown last which is counter intuitive. Is there a reason why full match is scored lower than partial. And is there a way to boost full match ?