Yes, Texis is an excellent platform for such a function. Ideally, this requires a sophisticated trade-off between the relevance ranking and the advertiser's bid for each possible result item. Texis has a facility for tuning and accomplishing such a calculation efficiently.