Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 39913 invoked from network); 28 Mar 2011 14:03:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2011 14:03:37 -0000 Received: (qmail 23097 invoked by uid 500); 28 Mar 2011 14:03:35 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 23027 invoked by uid 500); 28 Mar 2011 14:03:35 -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 23018 invoked by uid 99); 28 Mar 2011 14:03:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 14:03:35 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [145.58.30.185] (HELO out1b.mail.omroep.nl) (145.58.30.185) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 14:03:28 +0000 Received: from localhost (ou1bclean [10.10.30.159]) by out1b.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id 178CF3000232 for ; Mon, 28 Mar 2011 16:03:06 +0200 (CEST) X-Virus-Scanned: NPO ICT Received: from zeefje.vpro.nl (zeefje.vpro.nl [145.58.168.41]) by out1b.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id EC12C30000B3 for ; Mon, 28 Mar 2011 16:03:05 +0200 (CEST) X-ASG-Debug-ID: 1301320985-0084845ad103510001-z14J5S Received: from mail.vpro.nl (mail.vpro.nl [145.58.171.81]) by zeefje.vpro.nl with ESMTP id OQ2aBf0r9l6q0CiB for ; Mon, 28 Mar 2011 16:03:05 +0200 (CEST) X-Barracuda-Envelope-From: N.Breunese@vpro.nl X-Barracuda-Apparent-Source-IP: 145.58.171.81 Received: from VS-EX-01.intra.vpro.nl ([145.58.171.81]) by VS-EX-01.intra.vpro.nl ([145.58.171.81]) with mapi; Mon, 28 Mar 2011 16:03:04 +0200 From: Nils Breunese To: "user@couchdb.apache.org" Date: Mon, 28 Mar 2011 15:59:43 +0200 Subject: RE: suggestions on how to structure a delicious clone Thread-Topic: suggestions on how to structure a delicious clone X-ASG-Orig-Subj: RE: suggestions on how to structure a delicious clone Thread-Index: AcvtUBZd0zA5uqhdRaKocKgUMFGqfwAAE2KE Message-ID: References: , In-Reply-To: Accept-Language: nl-NL Content-Language: nl-NL X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: nl-NL Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: mail.vpro.nl[145.58.171.81] X-Barracuda-Start-Time: 1301320985 X-Barracuda-URL: http://145.58.168.41:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at vpro.nl X-Barracuda-Bayes: INNOCENT GLOBAL 0.5000 1.0000 0.0100 X-Barracuda-Spam-Score: 0.01 X-Barracuda-Spam-Status: No, SCORE=0.01 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.59219 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Why would you need a view per user? AFAIK you could just use /_design/delic= iousclone/_view/by_user?key=3D"username" to look up the documents for a spe= cific user. Or you could go the one-database-per-user route if you don't want everythin= g in a single database. Nils. ________________________________________ Van: bryan rasmussen [rasmussen.bryan@gmail.com] Verzonden: maandag 28 maart 2011 15:57 Aan: user@couchdb.apache.org CC: Nebu Pookins Onderwerp: Re: suggestions on how to structure a delicious clone If I did that I guess I'd have to have a different view per each user because views don't have access to the req object since views are static - correct? Given that I want a userbase of delicious size (pre-yahoo divestment issue) it does not seem to be optimal. Actually what I am doing now is having a view with the document ids and the user ids, and then(theoretically) having a list function that should get just the ones specific to a user, loading in the actual document and returning it... I say theoretically as typeof req is returning undefined, and I'm not going to be able to get anything in the query object as long as that is the case :) Best Regards, Bryan Rasmussen On Fri, Mar 25, 2011 at 4:40 PM, Nebu Pookins wrote= : > On Fri, Mar 25, 2011 at 9:25 AM, bryan rasmussen > wrote: >> >> I assumed every bookmark would be a little document consisting of >> mandatory name, mandatory uri(s) [can be either a string or array], >> mandatory user id, description, tags >> > [...] >> >> Also I need to be able to write queries that return a specific users >> bookmarks. What would be the suggested methodology for that > > I'm still new at CouchDB, but it seems to be that the easiest way to > do that would be to construct a view such that the user id is the key. > That way you can use the startKey and endKey parameter to isolate a > specific set of bookmarks belonging to only one user. > > - Nebu > ------------------------------------------------------------------------ VPRO www.vpro.nl ------------------------------------------------------------------------