I am using Azure Search service with Cosmos DB as a data source to enable the search feature in the nodejs application. There is a use case where I need to show the similarity in percentage(to 100%) for each document that is obtained from azure search API. For Eg:
API : https://name.search.windows.net/indexes/dbname/docs/search?api-version=2016-09-01
Payload: {
"search" : "This is a test key for search service",
"searchFields":"title, description",
"searchMode":"all",
"count":true
}
Response : "@odata.count": 2,
"value": [
{
"@search.score": 4.190574,// convert to ~70%(assumption) similarity
"title": "search service",
"description": "The Search Service test key provides extensive capabilities for search engine-like querying"
...},
{"@search.score": 3.9293563,// convert to ~40%(assumption) similarity
"title": "test key",
"description": " test measures your ability to enter groups of numbers using the numeric ten-key pad"
...}]
Is there any way by which the @search.score could be converted to doc1 - 70% and doc2 -40% based on the similarity with the search key? I read through the documentation on using scoring profiles and using a different algorithm for search API. I understand that the score is based on the indexes and there is no specific range to the score. But still, if any kind of conversion is possible then would be great, or do I need to think of another approach? Help will be appreciated :)