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 startkey endkey
Date Sun, 03 Apr 2011 20:25:21 GMT
On Sun, Apr 3, 2011 at 9:44 PM, Deistl Ross <deistlr@me.com> wrote:
> After searching various sources I can't find a solution, or I don't understand.  If
have a string "endkey=%22471345585383%22&startkey=%22471345585383%22&descending=true"
when sent to the appropriate _view yields the expected result. I create this rewrite,
>
> "from": "/stufffixq/:val",
>       "to": "_view/test6",
>       "method": "GET",
>       "descending": "TRUE",
>       "query": {
>           "endkey": [":val"],
>           "startkey": [":val",{}]
>
> This  string does not work, producing this response,
>
>       /_view/test6?endkey=%5B%22endkey%3D%5C%22471345585385%5C%22%26startkey%3D%5C%22471345585383%5C%22%22%5D&startkey=%5B%22endkey%3D%5C%22471345585385%5C%22%26startkey%3D%5C%22471345585383%5C%22%22%2C%7B%7D%5D&val=endkey%3D%22471345585385%22%26startkey%3D%22471345585383%22
200
>
> This response ignores the start and end keys and returns all the results for the _view.
>
> The non-rewrite request show this response,
> _view/test6?endkey=%22471345585383%22&startkey=%22471345585383%22&descending=true
200
>
> And returns the correct results
>
>
> How should the rewrite be written to produce the correct result?
>
>
>
This have been solved here:

https://issues.apache.org/jira/browse/COUCHDB-1074

Iwill commit it here tomorrow probably.

- benoît

Mime
View raw message