couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Schmidt <>
Subject Rewriting query keys
Date Wed, 27 Nov 2013 22:02:15 GMT
I want to show a list of tags in my couchapp. So I created a 
view "tags" which aggregates the items in my DB in the form 
key:[tagname_string[0],tagname_string], value=objectname.
Now I want to be able to use a list function, which just 
shows the objects with a certain key supplied in the URL. I 
created the following rewrite:
	{from: '/tags/:key', to: '_list/testList/tags'},
which internally queries _list/testList/tags?k=suppliedkey 
using the view _view/tags?k=suppliedkey . But this is invalid 
JSON, I need _view/tags?k=["suppliedkey"] . How can I rewrite 
to a valid JSON key?

Thanks, Oliver

View raw message