On 03/09/17 12:01, Cliff Stanford wrote:
sort = (collation[alphabet.indexOf char.toUpperCase()] ? char for char
in word.split '').join ''emit [sort, word]
Sorry, formatting issue. The emit should have been on the next line.
Cliff.
--
Cliff Stanford
London:+44 20 0222 1666
On 03/09/17 10:45, Cliff Stanford wrote:
OK, presumably I'd need to do this in each map function? Do I need to
copy and paste the code to each function or is there any way to use
subroutines across map function?
Actually, I realised there is a fairly simple way to do this in three
extra
On 03/09/17 06:44, Joan Touzet wrote:
The official answer is that CouchDB only supports UTF-8 collation order.
Thanks. I also tried "raw" collation order but that didn't help. I was
hoping there was a CouchDB way to alter the collation.
The unofficial answer is that one or more of the
On 02/09/17 20:54, Aurélien Bénel wrote:
I am using a language where the sort order for the alphabet is:
A B D E F G H I J K L M N O P R S Š Z Ž T U V Õ Ä Ö Ü
I know this is not exactly what you are trying to do, but in similar
situations I « normalize » keys before emitting them
in the order you want and emit that as the first key in a
compound key.
Best regards,
Joan
- Original Message -
From: "Aurélien Bénel" <aurelien.be...@utt.fr>
To: user@couchdb.apache.org
Sent: Saturday, 2 September, 2017 1:54:48 PM
Subject: Re: Custom Collation
Hi Cliff,
> I
Hi Cliff,
> I am using a language where the sort order for the alphabet is:
>A B D E F G H I J K L M N O P R S Š Z Ž T U V Õ Ä Ö Ü
> I need to sort the keys for my views based on this order. So:
> A a B b ... Ö ö Ü ü
> Is there any way to achieve this?
I know this is not exactly what you
Should you create a custom index based on each character ASCII code? You
could use String#charCodeAt() to get each one's code and build a custom
index
Joel Wallis Jucá
joelwallis.com
Em 2 de set de 2017 12:40 PM, "Cliff Stanford" escreveu:
> I have an interesting problem and I'm
I have an interesting problem and I'm not sure how to solve it.
I am using a language where the sort order for the alphabet is:
A B D E F G H I J K L M N O P R S Š Z Ž T U V Õ Ä Ö Ü
I need to sort the keys for my views based on this order. So:
A a B b ... Ö ö Ü ü
Is there any way to