Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 66248 invoked from network); 19 Mar 2010 23:28:33 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Mar 2010 23:28:33 -0000 Received: (qmail 90350 invoked by uid 500); 19 Mar 2010 23:28:32 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 90256 invoked by uid 500); 19 Mar 2010 23:28:31 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 90247 invoked by uid 99); 19 Mar 2010 23:28:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 23:28:31 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.223.198] (HELO mail-iw0-f198.google.com) (209.85.223.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 23:28:22 +0000 Received: by iwn36 with SMTP id 36so3277794iwn.29 for ; Fri, 19 Mar 2010 16:28:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.145.206 with SMTP id e14mr128613ibv.10.1269041280479; Fri, 19 Mar 2010 16:28:00 -0700 (PDT) Date: Fri, 19 Mar 2010 16:28:00 -0700 Message-ID: <40eb52621003191628h2e9ebbd0k4d6eefbb12155426@mail.gmail.com> Subject: ANDing of tags From: Eric Jonas To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 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