On Thu, Aug 23, 2007 at 03:57:39AM +0200, Raymond O'Connor wrote: > is it possible to write a custom sort routine for ferret? > > I use ferret right now to index all my products. One of the variables > in these product documents is the product popularity, where 1 = best > selling production, 2 = 2nd best, etc.. > > Right now, I'm just sorting by the popularity column in my search > results, although this doesn't always provide "good" results, neither > does just sorting by document relevance. I'd like some combination of > the two to sort by. Is it possible to do this efficiently with ferret?
Adding boosted ORed clauses that query for specific popularities might work: (query AND popularity:1)^3 OR (query AND popularity:2)^2 OR query Jens -- Jens Krämer webit! Gesellschaft für neue Medien mbH Schnorrstraße 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 [EMAIL PROTECTED] | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

