incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <>
Subject RE: "IN" SQL Clause in Couch View
Date Tue, 14 Sep 2010 20:07:55 GMT
You'll need to get the documents containing "Blue" and the documents containing "Cat" and let
the client do the intersection. Or add couchdb-lucene to the mix, which offers full-text indexing:

Van: Ido Ran []
Verzonden: dinsdag 14 september 2010 22:05
Aan: CouchDB MailingList
Onderwerp: "IN" SQL Clause in Couch View

I am trying to create a view like the one exist in taskr application called
I want to be able to retrieve all documents which contain all the keywords I

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,

View raw message