1

I have created a view on the db which emits key,value pair like so:

emit([doc.some_key, doc.inner_doc], doc)

Note that doc.inner_doc can be just any other JSON document. Now, there is a problem while fetching records for such keys. Whenever the doc.inner_doc key exceeds more than 2 items, for eg. {"a":1,"b":2,"c":3}, the view query fails to give any result.

I am using this python library to work with couchdb. A query with a key like [1, {"a":1, "b":2] works perfectly but same is not the case with keys exceeding 2 items.

Any leads?

Community
  • 1
  • 1
ham
  • 716
  • 5
  • 12
  • Just a little comment, never emit **doc** as a value since it will add the document into your index files. Instead, use the include_docs query parameter. I'll investigate your problem later today. – Alexis Côté Jul 27 '16 at 15:00
  • Thanks @AlexisCôté. I am actually emmiting `doc._id`. This was just an example. – ham Jul 29 '16 at 06:58

0 Answers0