Dynamic Sort Based on Input from Client

This is a tough one. I’m using React instantsearch. Is there any way to dynamically sort hits based on input from the user in the browser?

Context: I’m organizing products whose price depends on the number of users. I would like the user to be able to enter the number of users they have, we will calculate the price for each product, and then re-sort based on that calculation.

Any way to do this?

Hi @dom ,

There is no easy way to implement such a sort as the records in the indices are static.
If the number of user options is not too big, you can create multiple indices with precalculated prices and add the price to the ranking formula. Therefore, the selection of number of users will just switch the index to search in.

Feel free to add more details if I got something wrong.