couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Forno <fabio.fo...@gmail.com>
Subject Re: url rewriting & view update
Date Wed, 31 Mar 2010 11:50:05 GMT
On Wed, Mar 31, 2010 at 1:46 PM, Robert Newson <robert.newson@gmail.com> wrote:
> Deploying a new design document, with the updated view functions,
> building the views, and then using HTTP COPY to copy the new design
> document over the old one, allows for this already, regardless of
> whether you use URL rewriting.
>
> curl http://localhost:5984/db5/_design/foo -X PUT -d '{}'
> curl http://localhost:5984/db5/_design/bar -X PUT -d '{}'
>
> foo is current ddoc, bar is the new one.
>
> curl http://localhost:5984/db5/_design/bar -X COPY -H "Destination:
> _design/foo?rev=1-967a00dff5e02add41819138abb3284d"
>
> _design/foo is atomically updated to be the same as _design/bar, so
> any queries going to _design/foo are suddenly using the new index.
>

Great thanks a lot!

-- 
Fabio Forno,
Ooros srl
jabber id: ff@jabber.bluendo.com

Mime
View raw message