2011/2/23 Łukasz Mielicki <[email protected]>: > 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? > > Couchbook says: If you specify descending=true, the reading direction > is reversed, not the sort order of the rows in the view. > > Also my assumption is the reduced values are always provided in key > order (and [key, _id] for first reduce step). Does it apply to all > reduce steps then? > > Thanks, > Łukasz >
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.
