I have an index with the following sample vehicle data.
"_source": {
"Type": "Van",
"Year": 2016,
"YearStr": "2016",
"Make": "Ford",
"Model": "Transit",
"ColorDesc": "White"
}
When I run a multi field search with same weights for Make, Model and YearStr like "Ford 2017", the search results match the Ford make, but does not select the records with the Year = 2017 first. It matches all years (like 2016, 2017, 2018, etc) in random order. They all have the same score.
Why do the records that have the year = 2017 not have a higher score? If a record has Make= Ford and Year = 2017, shouldn't it get a much higher score than one with Make= Ford and Year = 2018, since the Make and Year can boost the scores?
The query I send is this ->
{
"min_score": 20,
"query": {
"multi_match": {
"fields": [
"Make^25",
"Model^25",
"YearStr^25",
"Type^20",
"Color^15"
],
"fuzziness": "AUTO",
"operator": "or",
"query": "Ford 2017",
"type": "best_fields"
}
}
}
Thanks for reading. Any ideas will be helpful.