Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFCD9109B4 for ; Sat, 4 Jan 2014 15:13:31 +0000 (UTC) Received: (qmail 81399 invoked by uid 500); 4 Jan 2014 15:13:29 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 81097 invoked by uid 500); 4 Jan 2014 15:13:25 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 81086 invoked by uid 99); 4 Jan 2014 15:13:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jan 2014 15:13:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of djc.ochtman@gmail.com designates 209.85.192.172 as permitted sender) Received: from [209.85.192.172] (HELO mail-pd0-f172.google.com) (209.85.192.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Jan 2014 15:13:18 +0000 Received: by mail-pd0-f172.google.com with SMTP id g10so16388754pdj.31 for ; Sat, 04 Jan 2014 07:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=AFR5YxZv9ptBjcw2jT/1PmG6vp+eXZTzp/KJp8ubScs=; b=VTWcxgrWzb1Ej+cd3eITnLWkIjrbtv0vP9lN47D4JvyAc9SN7gHJbt/JIBZKPIs1iJ +hzlHHhHgLE3J6tEoL+IL5DZXg/R41EiDL9Ccu546PTUG7AdYNtkRRJucuyAb1rtYFHv qER1djl4n0eWilocNHwjKm36kq9ESHUHOhNL3fIYCejWg5FvniAWlg1B2irin/t8bzaM 6sMbqI7ueW+50eTyZUrh/5LWJO6sZ2Z1jsSEszU6SwSL3qcX137X2oAyDLF4uRiJj2cg xCb5FmloeH0fdgZq8nSDj+dqnZ7HEJ35tq4j5PPCQXP3NxgWCXCr/Ztfz88xzrb2dfHq QhkQ== X-Received: by 10.68.198.68 with SMTP id ja4mr105096119pbc.24.1388848376347; Sat, 04 Jan 2014 07:12:56 -0800 (PST) MIME-Version: 1.0 Sender: djc.ochtman@gmail.com Received: by 10.70.68.34 with HTTP; Sat, 4 Jan 2014 07:12:36 -0800 (PST) In-Reply-To: References: From: Dirkjan Ochtman Date: Sat, 4 Jan 2014 16:12:36 +0100 X-Google-Sender-Auth: vrDabZFDuRTSAI-kHg38Mj0H2S4 Message-ID: Subject: Re: [Proposal] Hierarchical Views To: "dev@couchdb.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On Sat, Jan 4, 2014 at 3:05 PM, Hans J Schroeder wrote: > What is the current status of CouchDB and hierarchical views? I am not sure > if the idea has already been discussed, but it is a feature wich is really > needed. It's been discussed before, though not with this name. I don't think "hierarchical views" is a good description of this feature, because to make the initial pass fast you'd want to prevent passing documents to the query serveer at all, such that the filtering level is qualitatively different from the actual view procedure. The best solution I've discussed so far (with Jan, I think -- but it's been a while) is to have a the notion of a document "type" and affirm the common usage of a "type:" prefix for document ID's by allowing design documents to filter by the ID prefix (followed by a colon). I.e., name your documents "user:djc@apache.org", then add a property "types": ["user"] to a design document. Then, any views, filters, etc in that design document will discard any documents whose ID does not start with "user:" before passing it to a query server. Cheers, Dirkjan