Hi,

>> Has anyone explored the (relatively) new ‘Rewrite using JS’ feature?
> 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.

Well… I think the feature is broken when `query` has more than one attribute.

I tried this very simplified version of my problem.

    return {
      path: "_view/activity",
      query: {
        descending: "true",
        include_docs: "true"
      }
    };

And here are the logs when I query the corresponding URI:

[notice] 2017-01-17T17:40:45.014336Z couchdb@localhost <0.3810.1> efeff7b5a8 
127.0.0.1:15984 127.0.0.1 undefined GET 
/foo/_design/foo/_view/activity?descending=trueinclude_docs=true 400 ok 1

The ampersand (&) is missing between both query parameters.

Any dev out there to confirm or infirm?


Regards,

Aurélien

Reply via email to