On 07/08/2009, at 8:25 PM, Tim Somers wrote:
> function(doc) {
> if (doc.doc_type == "multiLangString") {
> emit(doc.default, {
> "default": doc.default,
> "en-GB": doc.en-GB,
> "fr-BE": doc.fr-BE,
> "nl-BE": doc.nl-BE
> });
> }
> }
In javascript, doc.en-GB is actually doc.en - GB i.e. a subtration
operation.
You need to do this:
"en-GB": doc['en-GB'],
"fr-BE": doc['fr-BE'],
"nl-BE": doc['nl-BE']
This is a general Javascript trap.
Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787
Isn't it enough to see that a garden is beautiful without having to
believe that there are fairies at the bottom of it too?
-- Douglas Adams
|