incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ido Ran <ido....@gmail.com>
Subject "IN" SQL Clause in Couch View
Date Tue, 14 Sep 2010 20:05:03 GMT
Hi,
I am trying to create a view like the one exist in taskr application called
tag-cloud/
I want to be able to retrieve all documents which contain all the keywords I
specify.

For example:
{
  _id: "A",
  keywords: ["Dog", "Cat", "Blue"]
}
{
  _id: "B",
  keywords: ["Dog", "Tree", "Blue"]
}

Now, if I ask for documents with ["Dog"] I want to get both documents back.
If I ask for documents with ["Blue", "Cat"] I want to get document A only
because B does not have both Blue and Cat.
The order is not important to me.

How can I go about it with CouchDB views?

Thank you,
Ido

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