Reputation: 1428
I'm trying to understand how the scoring has been generated for Azure Search matches as some of my results are distinctly odd (though probably correct if only I understood why!). There is nothing officially documented but is there anything like Lucene Explain for Azure Search?
Thanks
Upvotes: 0
Views: 189
Reputation: 1545
He there, I was having the same problem that you're having. A client of mine was asking me to help improve on search performance. I therefore reverse engineered the Azure Search scoring algorithm and documented it in a blog. Please take a look at it and let me know if its helpful.
It basically comes down to the following equation.
totalscore = (weightedfieldscores) ∗ (functionaggregration)
weighted field scores = (f*w) + (f*w) + ...
Where is f
the TF-IDF score of the field, and w
the weight configured in the scoring profile for the corresponding field. The summation of the weighted field scores is the total weighted field score.
This will be multiplied by the aggregated function score. Which is the following:
functionaggregration = fa(f1(x), f2(x), ...)
.
Where fa
is the aggregation functions, this can be the sum of all functions or the firs, or average, etc. And f1
, f2
are the tag, magnitude, etc. functions themselves.
Please let me know if this is helpful.
https://dibranmulder.github.io/2020/09/22/Improving-your-Azure-Seach-performance/
Upvotes: 0
Reputation: 980
The default scoring method use the TF-IDF algorithm to calculate a value for each searchable field in the document. Those values are then summed up together to create a final score.
More details on TFIDF here: https://lucene.apache.org/core/4_0_0/core/org/apache/lucene/search/similarities/TFIDFSimilarity.html
You can alter the score further by using scoring profiles to boost the score of certain fields. https://learn.microsoft.com/en-us/rest/api/searchservice/add-scoring-profiles-to-a-search-index
Upvotes: 1