couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terry Brownell <terrybrown...@gmail.com>
Subject Cooking up Views
Date Thu, 14 Oct 2010 23:07:33 GMT
Hi, attempting to port my semantic network DB to CouchDB, but I'm not
grokking the more complicated views, and in particular passing variables.

Looking for a cookbook recipe for creating a view (against the documents
below), that...

- Selects all documents where "isa" = "bird", that has a "nemesis", and
color is a variable ie: all yellow?


{
   "_id": "tweety",
    "isa": "bird",
   "_rev": "3-d085e60568133d80a96cd735c6c306f6",
   "color": "Yellow",
   "nemesis": "Sylvester"
}

{
   "_id": "Sweetie Pie",
    "isa": "bird",
   "_rev": "3-d085e60568133d80a96cd735c6c306f6",
   "color": "Yellow"
}

{
   "_id": "Woody",
    "isa": "bird",
   "_rev": "3-d085e60568133d80a96cd735c6c306f6",
   "color": "Blue",
"nemesis": "Buzz Buzzard"

}

Thanks

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