On Apr 2, 2015, at 10:31 PM, stamhaney <stam...@gmail.com> wrote:I would like to order a view on multiple fields where one field will be in ascending order while the other will be descending. I understand that the descending option is applied to the full set of the results for a query but there is no information on how a multi order sort can be achieved. Can you tell me how can I do this with a sample map/reduce query?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var letters = 'abcdefghijklmnopqrstuvwxyz'
var input = 'abc'
var output = ''
for (var i=0; i< input.length; i++) {
var idx_new = letters.indexOf('z') - letters.indexOf(input[i])
var new_letter = letters[ idx_new ]
output += new_letter
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/1B71EB15-94D2-437F-BCFA-BBB36A0F6F89%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.