We would like to know, whether Azure Search makes possible undermentioned scenario.
Let us have an Azure Search index with three columns:
1. Id [Edm.String]
2. Tags [Collection(Edm.String)]
3. MaxScore [Edm.Int32]
The index contains the following two entries:
Id Tags MaxScore
1 Paris,London,Rome 30
2 Paris 10
We have also a scoring profile and a scoring function of type Tag (Sum, Linear) which evaluate every tag by 10 points (boost = 10).
We want to search the records with tags "Paris, London" in this index and sort it according to the percentage of compliance, while 100% is the value in column MaxScore.
The problem is that by default Azure Search sorts records by score. So the results are following:
Id Tags MaxScore Score %
1 Paris,London,Rome 30 20 67%
2 Paris 10 10 100%
But we need to sort the records in descending order by the [%] column. It would be enough to makes possible Azure Search sorts records by expression. It would be something like $orderby=score*(100/MaxScore) in our case. However this is not currently possible.
Thank you.