I have a couchdb database containing different types of documents. Unfortunately some of those documents were generated without a type field, so I can not easily distinguish them. I want to add that type field now. Fortunately the doc_id has also this information, and I want to use it to perform the update.
What I would like is to create a temporary view of the documents whose doc_id matches a certain regex, let’s say:
^user_
Is there a way to define such a map function?
It works as expected:
Have you even tried anything?