"Algolia Dynamic Scoring with C# Integration"

Greetings! I have objects in Algolia with properties “score” (integer), “productId” (integer), and “name” (string). For example, I have two objects: object 1 is { "name": "A", "productId": 1, "score": 10}, and object 2 is { "name": "B", "productId": 2, "score": 9}. I’m sorting these objects based on the “score” field (set in Algolia dashboard => index => configuration => ranking and sorting).

Using C#, I want to pass two parameters as filter - “prodId” and “interactiveScore”. For example, if I pass “prodId”: 1, “interactiveScore”: 2, I want to subtract the “interactiveScore” from the “score” where “productId” equals “prodId” and then order by the updated “score”. In this example, object A’s score would become 10-2 = 8, and it should be second in the search results because object B’s score is still 9. Thank you.