couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Schmidt <oliver.schm...@orlives.de>
Subject Re: Rewriting query keys
Date Sat, 30 Nov 2013 15:27:08 GMT
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=false
but 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

Mime
View raw message