Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 21247 invoked from network); 12 Apr 2010 21:15:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Apr 2010 21:15:32 -0000 Received: (qmail 39293 invoked by uid 500); 12 Apr 2010 21:15:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 39176 invoked by uid 500); 12 Apr 2010 21:15: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 39168 invoked by uid 99); 12 Apr 2010 21:15:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 21:15:31 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alexander.uvarov@gmail.com designates 209.85.218.221 as permitted sender) Received: from [209.85.218.221] (HELO mail-bw0-f221.google.com) (209.85.218.221) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 21:15:23 +0000 Received: by bwz21 with SMTP id 21so4959785bwz.35 for ; Mon, 12 Apr 2010 14:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=/zZ4nnCIS6bUuH1jBGSqbBm4SKV5R1AE92sTJkoLp+c=; b=wFvz/uM1Mt8mdNoBxAoAIykyM+EnCKATrdBsQFfrUR03h0qskR5j2rlks8zfzOS20q WSnGGxjmhSerO6Ld9vNrk5R9XlsUX2IJ/dUHb0JvMu6aVR6GRgGJYMijPIpVWbXeb3jR G+B/SuBcKMoeGEDB7RklmtXBD1eS5/ZQehI2A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=jyYYW2uPQMEN/DDr6MQJlO8k24blKuKkspehJB4N4osipIuNhA6PcB5pg2x17/4Gwo K9Zs41cQ1k/it3ANUIk7jfq1ZD8BLeh2XO7/5VAz4oyCkXUa+4AWYA0LNzv5NaUlJlul YN+ayyfT/NZHb89Tj4vSfXiqpDnYNbeViMo3k= Received: by 10.102.174.3 with SMTP id w3mr2430632mue.48.1271106902801; Mon, 12 Apr 2010 14:15:02 -0700 (PDT) Received: from [94.50.236.171] ([94.50.236.171]) by mx.google.com with ESMTPS id w5sm1404093mue.54.2010.04.12.14.15.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Apr 2010 14:15:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1078) Subject: Re: an aggregate object From: Alexander Uvarov In-Reply-To: Date: Tue, 13 Apr 2010 03:14:58 +0600 Content-Transfer-Encoding: quoted-printable Message-Id: <649AAA20-9486-48DE-8AE0-1865DBD44F39@gmail.com> References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1078) X-Virus-Checked: Checked by ClamAV on apache.org Why not just create the following: { "_id": "some_id_3", "type": "Page", "text": "Some text", "related_docs": ["some_id_2, "some_id_3"] } { "_id": "some_id_2", "type": "Image", "size": "1024x768", "title": "Nice chick" } { "_id": "some_id_3", "type": "Movie", "duration": "600", "title": "Cool movie" } And store actual image and movie as attachment. Use this guide = http://blog.couch.io/post/446015664/whats-new-in-apache-couchdb-0-11-part-= two-views to retrieve Content and related documents in 1 query. On 13.04.2010, at 2:59, Kenneth Tyler wrote: > this may sound a little strange >=20 > i am trying to build up a "content" object that can contain several > kinds of files. >=20 > for example, it might contain a some text, and an image, and a video = clip >=20 > i want to tag my documents in couch so that i can retrieve the whole > "family" of documents >=20 > so i use a field called "name" and i put the uuid generated for the > first document in the family into that field in all the documents i > want to belong to the content "family".... i add that documents own > uuid as the second part of the "name": 89ehjwol8e7/7896w89e6r >=20 > i this case we would have documents T I AND V, and they would all have > "names" with the same uuid at the beginning of the string >=20 > so i can make a view with the "name" fields as the key and get back > all three documents by using a regular expression that looks for the > common head of the string in all the name fields >=20 > ..... > it gets more complicated later... but first i wanted to check and see > if this approach "fits" with the way couchdb "wants" things to be done >=20 > i love couch... i really think its going to be huge.... i'm coming > from a ms access application developer background... so a lot of stuff > is strange at first... and i have a lot of "relational" habits about > how i think about data >=20 > thanks >=20 > ken tyler