Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 68456 invoked from network); 12 Feb 2009 15:47:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Feb 2009 15:47:02 -0000 Received: (qmail 12946 invoked by uid 500); 12 Feb 2009 15:46:59 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 12918 invoked by uid 500); 12 Feb 2009 15:46:59 -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 12907 invoked by uid 99); 12 Feb 2009 15:46:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2009 07:46:59 -0800 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.162.183] (HELO el-out-1112.google.com) (209.85.162.183) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2009 15:46:48 +0000 Received: by el-out-1112.google.com with SMTP id s27so523123ele.14 for ; Thu, 12 Feb 2009 07:46:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.133.18 with SMTP id g18mr1088880ybd.166.1234453587223; Thu, 12 Feb 2009 07:46:27 -0800 (PST) In-Reply-To: <4b307fd10902120242v3bbbc93fs92c88503eb632fe9@mail.gmail.com> References: <4b307fd10902120242v3bbbc93fs92c88503eb632fe9@mail.gmail.com> Date: Thu, 12 Feb 2009 10:46:27 -0500 Message-ID: <64a10fff0902120746j187aff2bpc1e5585b32007497@mail.gmail.com> Subject: Re: playing with tags From: Dean Landolt To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd485648ee55e0462ba9fde X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd485648ee55e0462ba9fde Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, Feb 12, 2009 at 5:42 AM, Nicolas Clairon wrote: > Hi there ! > > I'm playing with tags these time and a question comes to me. > For exemple, I have a bunch of blog articles: > > article1 = { > ...snip..., > tags : ["couchdb", "python", "best practices"], > } > > article2 = { > ...snip..., > tags : ["python", "best practices"], > } > > article3 = { > ...snip..., > tags : ["couchdb", "best practices"], > } This is an issue that has been nagging at me lately. Storing tags in the doc seems like a recipe for disaster (that is, if you consider view contention disaster). I would argue that tags (and other readily changeable user-specific state information like read/unread, favorite, blah blah) should be kept in separate docs and bridged together in views. Of course, doing this means you lose the ability to map through this data (e.g. no tag clouds), so it's a lose/lose right now. This is something I just can't figure out how to get around without a map/reduce/map kind of paradigm. Paul Davis mentioned some ideas about value indexes and view intersections that may help here. Does anyone else have opinions on how best to design for this? Someone floated the article *Accountants Don't Use Erasers* [1] recently that further convinced me this kind of data should be external to the doc in question, but I'm at a loss for how to do this without sacrificing functionality. [1] http://blogs.msdn.com/pathelland/archive/2007/06/14/accountants-don-t-use-erasers.aspx --000e0cd485648ee55e0462ba9fde--