lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Sort by function
Date Thu, 06 May 2010 18:36:11 GMT

: Value=sum(sum(f1,f2,f3),sum(pow(x,4),f1))

: The closest thing I can find is the ³sort by function², which doesnıt seem
: to be available in 1.4. If such a thing is possible in 1.4, could someone

Hey doug: I think i was mistaken the last time we talked.

As you've discovered (and as Koji verified) Sort by function is not 
available in Solr 1.4.

What you can do however (w/o applying any patches) is query on a function 
so that the function result is used as the score, and then use filter 
queries to constrain the resulting documents.  for simple "i need to sort 
by a function" purposes this works fine, what it can't deal with (cleanly) 
is "i want to sort by a field desc, and then i want a secondary sort on a 
funcA() asc, and then a tertiary sort on funcB() desc, ..."





View raw message