@Rob Bast Above links assume that there is a field that has custom score already in the documents, whereas we are asking for the way to sort documents based on the custom score that are calculated on the fly, particularly when the order is received, we try to find the score of each supplier based on the incoming order, which means these scores are not calculated already and are sent to typesense.
Rank of Supplier = function (Incoming Order). Once order is received we have to show Ordered list of suppliers in order of ranks we have calculated.