Multiple key query to CouchDB
Svetoslav Nedkov
snedkov at asteasolutions.com
Fri Feb 26 14:32:27 UTC 2010
Hi Colin,
While looking for other information I stumbled upon a way to supply
multiple keys to a CouchDB view and retrieve multiple results respectively.
In short the solution is to make a POST request to the view and as data
supply keys in the format {"keys": ["key1", "key2"..."keyn"]}.
Here is an example:
curl -X POST
http://142.150.154.59:5984/mccord/_design/artifacts/_view/viewByObjectCode \
-d
'{"keys":[{"objectCode":"01","lang":"en"},{"objectCode":"09","lang":"en"},{"objectCode":"05","lang":"en"}]}'
I hope this will allow us to remove the Lucene view completely.
Regards,
Svetoslav
More information about the fluid-work
mailing list