Thanks for the help.
I'm not sure I fully understand your query, but I dont think that would 
work because my popularity variable basically ranges from 1 to ~1.5 
million (where a product with popularity 1 is the best selling product 
and a popularity with 1.5 million is the worst selling product).  Its 
similar to an Amazon sales rank if you're familiar with that.

Correct me if i'm misunderstanding what you're suggesting though.

Thanks,
Ray



Jens Kraemer wrote:
> 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

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to