couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: rewrites with keys and arrays
Date Sun, 31 Mar 2013 13:02:45 GMT
add

"formats": {
  "name": "string"
}

it should work.

- benoƮt

On Sun, Mar 31, 2013 at 2:42 PM, Thomas Mohaupt
<thomas.mohaupt@gmail.com> wrote:
> Hi,
>
> I want to define a rewrite rule like:
>
> {from: '/foo/:name', to: '_list/foo/bar', query: {reduce: 'false', keys:
> [[1,':name'],[2,':name']]}},
>
> But a request of
>
>       /couch-dev/_design/app/_rewrite/foo/TA
>
> is rewritten as
>
>      /couch-dev/_design/app/_list/foo/bar?
> reduce=false&keys=%5B%5B1%2C%22%3Aname%22%5D%2C%5B2%2C%22%3Aname%22%5D%5D&name=TA
>
> which means var :name is not matched/resolved.
>
> Any hints?
>
> ThoMo

Mime
View raw message