couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Lutz <>
Subject Re: Handling unique URL friendly identifiers
Date Thu, 31 Dec 2009 08:28:22 GMT
> I think it's actually good practice to use docids for friendly identifiers. Then collisions
between URL slugs will appear as couchdb conflicts (eventually, in the case of distributed
app, and immediately, in the case of a single node or partitioned cluster).

At first I thought this, too. But this would mean documents have to be deleted and then re
added for updates. _ids used to realize a sort of relation have to be changed, too - like
comments in a blog. So I thought it might be better to avoid further problems by not using
url friendly identifiers as _ids.

But I see the point: Better error handling. Additionally it might be useful to add a prefix
to distinguish between content types and being able to have the same identifiers for different
content types.

View raw message