We're using Find to get personalized results for commerce products like so (psuedo-ish code for brevity) -
var searchService = ITypeSearch<OurProductModel>();
searchService = searchService.For(term)//plus boosting, best bets, synonyms, etc
searchService = searchService.OrderBy(p => p.Code); //this is actually in a switch statement to allow the user to sort by item number, name, brand, etc
searchService = searchService.Skip(...).Take(...) //do skips and takes for paging
var results = searchService.Select(OurProductModel=> new ProductResultItem{//do the mappings}).GetResult();
As noted, we apply the OrderBy in a switch statement corresponding to the user choice. I want to add a new choice but the crux of the issue (I think) is that the new value to sort by is NOT in the index. We want to add a sort by price, however, in this B2B site prices vary by customer which means theoretically one product could literally have thousands of prices. We retrieve the price for the current user from an external service that sits behind a cache layer.
So, I guess the simple form of the question is, is there a way to apply an OrderBy for a value not in the index like:
searchService.OrderBy(p => _priceService.GetPrice(p.Code, currentUserAccountNumber));
Spoiler, I've tried this and while it executes, calls our price service, and does not error, it also does not sort.