incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <>
Subject RE: suggestions on how to structure a delicious clone
Date Mon, 28 Mar 2011 13:59:43 GMT
Why would you need a view per user? AFAIK you could just use /_design/deliciousclone/_view/by_user?key="username"
to look up the documents for a specific user.

Or you could go the one-database-per-user route if you don't want everything in a single database.

Van: bryan rasmussen []
Verzonden: maandag 28 maart 2011 15:57
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

View raw message