incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Kuprianov <andrey.koupria...@gmail.com>
Subject Re: How to specify different sort order for the elements of a compound map key?
Date Wed, 05 Sep 2012 04:49:57 GMT
Have you tried descending=true?

On Wed, Sep 5, 2012 at 12:16 PM, Pulkit Singhal <pulkitsinghal@gmail.com>wrote:

> I have a map with a compound key which naturally sorts in an ascending
> order as:
> [No, 2011]
> [No, 2012]
> [Yes, 2011]
> [Yes, 2012]
>
> But I want it to sort as:
> [No, 2012]
> [No, 2011]
> [Yes, 2012]
> [Yes, 2011]
>
> Which means the first element in the key No/Yes should be sorted in an
> ascending order, whereas the timestamp should be sorted in a descending
> order.
>
> Is there a way to do this in a query? Or do I have to come up with some
> hack in my mapping function?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message