incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <>
Subject Re: How to give user feedback on view progress
Date Sat, 04 May 2013 20:03:44 GMT
On 4 May 2013 21:23, Alexander Gabriel <> wrote:
> O.k., I'll look this up. Thanks!
> In one of my couchapps people upload data and then it can take a while for
> the index to catch up. No data has to be downloaded then, so that case is
> all about following the updating of the index. And as I present links so
> the Users can check the result of the upload, I should also tell them when
> they can do this.
> I'd need a couchdb specific method for that, probably?

Some of these might be useful;

After the upload is complete, query the view with stale=update_after,
to trigger a view update. You can use &limit=0 to get an instant
return and not have to transmit any data back.

Or you can query the view and leave off the stale= part, when that GET
returns, your view is up to date.

Or if this user is the only one writing to the DB (classic local couch
style with replication elsewhere) you *could* use
update_seq=true&stale=ok and compare the update_seq with that of the
DB itself.

You can also see in _active_tasks the current state of a view being built;

        "changes_done": 9346,
        "database": "testy",
        "design_document": "_design/simpleform",
        "pid": "<0.31025.15>",
        "progress": 41,
        "started_on": 1367697289,
        "total_changes": 22454,
        "type": "indexer",
        "updated_on": 1367697741

The first 2 options are probably your best bet.


View raw message