couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Wenk <a...@nms.de>
Subject Re: Rewriting query keys
Date Fri, 13 Dec 2013 17:31:09 GMT
not sure if I get this wrong, but this is no JSON at all ...

https://github.com/schmittlauch/recipecouch/blob/taglist/lib/rewrites.js

I guess you know this wiki page :
http://wiki.apache.org/couchdb/Rewriting_urls


On 30 November 2013 16:27, Oliver Schmidt <oliver.schmidt@orlives.de> wrote:

>  Am Samstag, 30. November 2013, 15:12:35 schrieb Martin Higham:
>
> > If you could provide the code for the view you are using then it would be
>
> > easier to supply the rewrite you need
>
> >
>
>
>
> Here's the code:
> https://github.com/schmittlauch/recipecouch/tree/taglist/lib
>
> The rewrite rule not working is {from: '/tags/:tag', to:
> '_list/testList/tags', query: { reduce: false, key: ":tag"}},
>
>
>
> It works great if I directly give the querykey to the list function with
> http://localhost:5984/recipes/_design/recipe-couch/_rewrite/_db/_design/recipe-couch/_list/testList/tags?key=%22fish%22&reduce=falsebut
if I want to use it with the rewrite URL
> http://localhost:5984/recipes/_design/recipe-couch/_rewrite/tags/ad it
> now responds with {"error":"unknown_error","reason":"badarg"}
>
> Btw, if you want to deploy this couchapp you need http://kan.so/
>
>
>
> Big thanks in advance, Oliver
>



-- 
Andy Wenk
Hamburg - Germany
RockIt!

http://www.couchdb-buch.de
http://www.pg-praxisbuch.de

GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

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