You could make key in your view with tags, and then query view using startKey, endKey parameters.
Regards -- Paweł Stawicki http://pawelstawicki.blogspot.com http://szczecin.jug.pl On Sat, Mar 20, 2010 at 00:28, Eric Jonas <[email protected]> wrote: > I know this question has come up before, and the answer has often been > "do multiple queries and do the intersection client-side". But there > were also discussions about possibly adding this functionality to > couchdb. > > I have a document archive with up to 100k documents, each of which has > a 'tags' field consisting of a list of string-based tags like so: > > { tags: ['hello', 'world', 'testing']} > > I would like to let my users search for documents containing all of > some subset of the tags. For example, "all documents containing the > tag 'hello' and 'world'". It's the logical _and_ there that continues > to vex. Doing the conjunction on the client would be problematic for > very popular tags, potentially necessitating the download of tens of > thousands of documents. > > Is there any reasonable way to appropriately create a view to make > this operation less painful? > > Thanks! > ...Eric >
