Search code examples
c#azure-cognitive-searchscoring-profile

Scoring Profile Boosting negative with a boost below 1 in Azure Cognitive Search?


Within Azure Cognitive Search scoring profiles, you can use boosting functions. Here is one I'm working with:

{
    "type": "magnitude",  
    "fieldName": "TasksCompleted",  
    "boost": .75,  
    "interpolation": "linear",  
    "magnitude": {
        "boostingRangeStart": 1,  
        "boostingRangeEnd": 30,  
        "constantBoostBeyondRange": true
}

I chose .75 for boost because I'm trying to have the boost be pretty small compared to some other boosts that are present. However, I noticed that the boost seemed to be working backwards, where 1 was the most boosted document and 30 was the least. This is opposite of how the other magnitude boosts were working.

Are scoring profile function boosts with a boost value below 1.0 reversed for some reason? Or do they somehow reduce the total boost for matching documents (even though my function aggregation is set to SUM)? I can't find any documentation around using numbers below 1.


Solution

  • As per Adding scoring profiles to a search index this is documented for functions freshness property, but in general, using a boosting factor of less than 1 will reverse the boosting.