Relevance tuning in platform search -scoring profile

We would like to define the weight by default for some fields and those weight criteria applied for search query. We want to same functionality that's available in App Search(Relevance tuning) in platform search. For example, we can set weight/boost value between 1 to 10 for few fields by default and then score will calculate based search filter/query criteria.

In our case, weight/boost would be defined for year field as 7, stocktype as 6, make as 5 and model as 4 by default. Without defining any field value like make =”audi” and define only weight value. Consider if query returns 10 documents based search criteria and result order would be based on weight criteria defined(year:7, stocktype:6, make:5).

{
"size": 10,
"query": {
"function_score": {
"query": {
"match": {
"make": "audi"
}
},
"boost": "5",
"functions": [
{
"filter": {
"terms": {
"stocktype": [
"new",
"used",
"cpo"
]
}
},
"weight": 20
},
{
"filter": {
"terms": {
"make": [
"audi",
"bmw"
]
}
},
"weight": 42
}
],
"max_boost": 50,
"boost_mode": "multiply"
}
},
"sort": [
{
"_score': {
"order": "desc"
}
}
]
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.