On Tue, Mar 15, 2011 at 9:04 PM, Yonik Seeley <yo...@lucidimagination.com> wrote: > On Tue, Mar 15, 2011 at 10:35 AM, MOuli <zar...@hotmail.de> wrote: >> I want so sort ASC on a price field, but some of the ouldocs got a 0 (not >> NULL) >> value. Now I want that this docs are at the end when i sort the price field >> ascending. Is it possible? > > In 3.1 and trunk (4.0-dev), you could sort by a function query that > maps values of 0 to something very large. [...]
Not sure how you are indexing, but in addition to the above suggestion by Yonik, one could ignore 0's at indexing time, i.e., ensure that 0 values for that field are not indexed, and use sortMissingLast. Regards, Gora