CouchApp stale or stale after_update

23 views
Skip to first unread message

thiebaut...@gmail.com

unread,
Jan 16, 2014, 6:14:21 AM1/16/14
to couc...@googlegroups.com
Hey,

I'm discovering CouchDB and CouchApp for the first time. I try to generate view, but my data are more than 1GB.
The problem is when i push a new modification of a view CouchDB recalculate all indexes. I now there are the option
Stale=ok or Stale=after_update. Do you how traduce the fact, that when I push a new view, I can force couchDB with that
option in the view ?

Thanks

Olivier

Benoit Chesneau

unread,
Jan 22, 2014, 4:50:24 AM1/22/14
to couc...@googlegroups.com
Reindexation only happen when you access to the view with the new code. A push by itself don't trigger any action, so accessing to the view with the stale option will return the current indexed result. 

- benoit

Nils Breunese

unread,
Jan 23, 2014, 4:02:54 AM1/23/14
to couc...@googlegroups.com
Benoit Chesneau wrote:

>> I'm discovering CouchDB and CouchApp for the first time. I try to generate view, but my data are more than 1GB.
>> The problem is when i push a new modification of a view CouchDB recalculate all indexes. I now there are the option
>> Stale=ok or Stale=after_update. Do you how traduce the fact, that when I push a new view, I can force couchDB with that
>> option in the view ?
>
> Reindexation only happen when you access to the view with the new code. A push by itself don't trigger any action, so accessing to the view with the stale option will return the current indexed result.

Also, to avoid clients having to wait a long time for a response in a live environment check out http://wiki.apache.org/couchdb/How_to_deploy_view_changes_in_a_live_environment

Nils.
Reply all
Reply to author
Forward
0 new messages