I've been reading up on the documentation for couch db views (http://wiki.apache.org/couchdb/HTTP_view_API#HTTP_View_API, http://www.barkingiguana.com/2009/01/22/filtering-and-ordering-couchdb-view-results/) however I'm not finding what I'm looking for and I'm beginning to think its not supported.
I have two records in a couch database
{
"_id": "UUID",
"_rev": "rev",
"status": "complete",
"csv": [
{
"Lower": 0.09,
"Upper": 0.31
}
],
"tags": {
"get_info": {
"duration": "24",
"location": "south"
}
}
}
and
{
"_id": "2-UUID",
"_rev": "2-rev",
"status": "complete",
"csv": [
{
"Lower": 0.01,
"Upper": 0.70
}
],
"tags": {
"different_info": {
"duration": "60",
"location": "south"
}
}
}
Is it possible to create a view and add query parameters that would return all records that have the tag "key":"value" (e.g I want all records tagged "duration":24 or I want all records tagged "location":"south"). I don't want to hard code any key/values into a view - they should be passed with the query.
Is there another way of thinking about it that's not a view?