couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <>
Subject Re: Why is CouchDB frequently re-indexing my views from scratch?
Date Thu, 18 Jun 2009 20:31:10 GMT
On Thu, Jun 18, 2009 at 12:32 PM, Jim Puls<> wrote:
> On Jun 18, 2009, at 11:53 AM, Damien Katz wrote:
>> On Jun 18, 2009, at 2:42 PM, Nadav Samet wrote:
>>> Does the design doc change? Views are regenerated following any edit of
>>> the
>>> design doc that contains them.
>> Yes, good question. Though one small correction, it's not just any edit of
>> the design document, only a change to a view will trigger the reindexing.
>> You can edit other parts of a design doc just fine.
>> -Damien
> It appears that every time my server restarts, CouchRest is re-saving the
> design doc for its models. This brings up two questions:
> 1. Should CouchRest be doing this? Should I find a way around it so that the
> design docs don't get re-saved unless they change? I seem to recall that
> previous versions took a hash of the view contents to avoid this very
> problem.
> 2. Should CouchDB be reindexing views that were re-saved, unchanged from
> their previous content?

This is a known CouchRest issue. It generates the design docs from the
model, and the process is often different for no good reason. I
haven't dug in to figure out why or what to do about it, as I don't
use that feature anymore (I prefer to manage my views by hand using

CouchRest is probably changing something subtle with the model each
time it boots. It's a fairly serious issue for an ORM library, but as
I said I don't use that feature, so I'm not in a position to change
it. Generally the process of writing and using CouchRest was enough to
convince me that I don't want to deal such a thick library around
CouchDB. I still use CouchRest but I stick with the raw Document
class, myself.


Chris Anderson

View raw message