incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Mielicki <mieli...@gmail.com>
Subject Re: reduce order vs descending
Date Wed, 23 Feb 2011 19:22:21 GMT
2011/2/23 Paul Davis <paul.joseph.davis@gmail.com>:
> 2011/2/23 Łukasz Mielicki <mielicki@gmail.com>:
>> Hi everybody,
>>
>> I can observe that order of values provided to reduce function depends
>> on descending query parameter.
>> Is this a bug?  Or does Couch support left and right reduce separetely?

> Never write code that depends on the ordering of keys in reductions.
> It will break. The order is undefined and I don't ever see it being
> defined due to lots and lots of edge cases in that code.

I pretty confident about my use-case properties. It is similar to
finding max value(s), but in my case key/id matters because they
contain information (I'm not using UUIDs). The remaining questions is
if do I have to sort them in reduce step given descending is always
true.

IMHO its vital to be able to get both left-reduce and right-reduce
semantics over key range.

Thanks,
Łukasz

Mime
View raw message