Consider upgrading to the 3.1 branch which gives you true sort by function
http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Training in Europe - www.solrtraining.com

On 18. juni 2010, at 01.23, Chris Hostetter wrote:

> 
> : I want to reorder the results as per function like
> : sum(w0*score, w1*field1, w2*field2, w3*filed3,..)
> : 
> : I am using solr1.4 and it seems it does not support sort by function.
> : 
> : How can this be achieved
> : 
> : I tried using
> :  q=(query)^w0 (_val_:field1)^w1 (_val_:field2...)^w2
> 
> try fq=(query)&q={!func}sum(...)
> 
> ...if you can't express the entire query as a pure function, and need to 
> resort to a BooleanQuery consisting of many individual function queries 
> (like in your example) then consider writing a custom Similarity class 
> that eliminates the querynorm.
> 
> 
> -Hoss
> 

Reply via email to