Clever... but if more than one row adds up to the same value I may get the wrong order (like 50, 50 and 10, 90)
I need a max function but the one provided only compares against a constant. Sent from my iPhone On Aug 24, 2009, at 6:15 PM, Koji Sekiguchi <k...@r.email.ne.jp> wrote: How about using sum() FunctionQuery, via: http://localhost:8983/solr/select/?q=_val_%3A%22sum%28width%2Clength%29%22 Thanks, Koji Erik Earle wrote: Suppose I have a database of rectangle attributes that I have indexed in Solr and I want to get the top 10 widest or longest rectangles from one query. name | width | length A | 100 | 10 B | 10 | 90 C | 80 | 10 ... My indexed fields are: name, width, length Is there a way to query so that my data returns the order: A, B, C