incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: Rewrite adds quotes to parameters
Date Mon, 03 Dec 2012 16:16:30 GMT
l
On Nov 30, 2012 2:54 PM, "Aliaksandr Barysiuk" <a.barysiuk@gmail.com> wrote:

> Hello,
>
> I'm trying to create a rewrite rule for my view that looks like:
> /myview/3/["1","2"]/["1","4"].
> Rewrite rule is:
> {
>     "from": "/myview/:group_level/:**startkey/:endkey",
>     "to":   "/path_to_db_and_design_doc/_**view/myview",
>     "query": {
>         "group_level" : ":group_level",
>         "startkey"    : ":startkey",
>         "endkey"      : ":endkey"
> }
>


There is a special case for view parameters and it isn't expected to pass
them as parameter in current implementation of the rewriter:

https://github.com/benoitc/couchdb/blob/master/src/couchdb/couch_httpd_rewrite.erl#L286

Instead I would suggest you to do rename the variable name or just using
them as query params.

- benoit

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message