incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pulkit Singhal <pulkitsing...@gmail.com>
Subject How to specify different sort order for the elements of a compound map key?
Date Wed, 05 Sep 2012 04:16:01 GMT
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