No, the views are not regenerated as long as the views property itself is not changed. CouchDB calculates a hash over the views
property of the design document and uses this hash as the filename of the view.
We use this feature a lot in production: We regularly update our design documents, and as long as the views themselves do not change the views are not regenerated.
BTW: This is also the reason why you can use CommonJS modules and require()
in views, but you are restricted to paths within views
. You can do this for example:
{
...
"views": {
"lib": {
"underscore": "... (underscore.js here)"
},
"my_view": {
"map": "function (doc) { var _ = require('views/lib/underscore'); emit(doc._id, _.pick(doc, 'name', 'address'); }"
}
}
}
But you cannot use a require
like this: var _ = require('underscore');
Hope this helps!