couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Talbot <>
Subject Re: noobie questions
Date Mon, 24 Oct 2011 07:39:40 GMT

Is the Wiki out of date?  From

"Note that by default views are not created and updated when a
document is saved, but rather, when they are accessed. As a result,
the first access might take some time depending on the size of your
data while CouchDB creates the view. If preferable the views can also
be updated when a document is saved using an external script that
calls the views when updates have been made."

It also lists an example of how to update views asynchronously:

You could also consider stale=update_after, which will give you a
quick return at the cost of potentially out of date data, but which
will also trigger a view update, so the next queries will potentially
be more up to date.

I'll leave Bulk Operations and View Collation for experts to answer,
but I suspect for part 4 that you'll have more joy if you emit the tag
first, then the date and collate something like

startkey=["blah", "2010-10"]&endkey=["blah", "2010-10{}"]



On Mon, Oct 24, 2011 at 17:11, Roger Rohrbach <> wrote:
> I'll answer the easy question: views are updated at document insertion time.
> On Oct 24, 2011, at 8:28 AM, Karl Seguin wrote:
>> First, I only found some vague references, but are views only updated on
>> read request? (assuming there's something to update). There's no built-in
>> mechanism to have views updated in the background say for every X
>> changed/new documents or X seconds?


View raw message