couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien Bénel <aurelien.be...@utt.fr>
Subject Re: Rewriting a parameterized URL
Date Sat, 05 Jun 2010 19:08:33 GMT
> All parameters are passed after that or at least was.

It is indeed the problem. They are passed *unchanged*. Therefore it is impossible to "rewrite"
them. Moreover, variables don't seem to be bound to parameters with the same name.

As a matter of fact, after your first advice, I changed my rule to:
[{
  "from": "/item",
  "to": "_list/mapping/kwic",
  "query": {
    "startkey": [":corpus"],
    "endkey": [":corpus",{}]
  }
}]

However,
/cassandre/_design/cassandre/_rewrite/item?corpus=MISS
was rewritten to
/cassandre/_design/cassandre/_list/mapping/kwic?startkey=[":corpus"]&endkey=[":corpus",{}]&corpus=MISS

instead of
/cassandre/_design/cassandre/_list/mapping/kwic?startkey=["MISS"]&endkey=["MISS",{}]

> I will check it later tonight anyway.

Thanks.


Aurélien


Mime
View raw message