Thanks, Stefan, that was my problem. A fresh pair of eyes is always
welcome. Very very silly.
I did not pay enough attention to the fact that most of the code given as
examples for views is actually designed for string keys. It requires more
care to make it work for any type.
Vincent

On Thu, Dec 1, 2016 at 4:06 AM, Stefan du Fresne <ste...@medicmobile.org>
wrote:

> It’s hard to tell from your post, but note that 0 is falsy in Javascript,
> so if you’re doing something like “if (value) { emit(value) }” then values
> of 0 will not get emitted.
>
> Stefan
> > On 1 Dec 2016, at 01:00, Vincent Lextrait <vincent.lextr...@gmail.com>
> wrote:
> >
> > Hello,
> >
> > There must be something I do which is badly wrong, I am using emit with a
> > numeric key. It is so simple that I cannot believe it is a couchdb bug.
> > It works fine with all keys which are not 0, and documents are properly
> > inserted in the view. When the key is 0, emit does not seem to generate
> an
> > insertion in the view.
> > Any idea?
> >
> > Thanks a lot,
> > Vincent
>
>

Reply via email to