Hi folks, > Has anyone explored the (relatively) new ‘Rewrite using JS’ feature?
No-one? Really? > The problem is that, for now, I fail figuring out how to format the value of > the `query` attribute. (…) > Then I reread the corresponding documentation > (http://docs.couchdb.org/en/2.0.0/api/ddoc/rewrites.html#rewrite-section-a-is-stringified-function) > and discovered that `query`was supposed to be an array. But nothing was > written about how the array was supposed to be formatted. I’ve just found the acceptance tests corresponding to this feature: https://github.com/apache/couchdb/blob/master/test/javascript/tests/rewrite_js.js So, it seems that the documentation is erroneous: the `query` attribute not an array but an object. That makes more sense! I would still be interested in `rewrites.js` samples. But if anyone have any I will « guess and check » starting from the examples given in the tests. Regards, Aurélien
