couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Sann <davesan...@gmail.com>
Subject Use MD5 (or alternative digest hash) as _id
Date Wed, 28 Sep 2011 05:08:30 GMT
Hi all,

I am just starting out with Couch DB and I was wondering whether it is
possible or planned to have the database use a specific digest/hash
algorithm, rather than a GUID when auto-generating identifiers.

In my case, I don actually care what the id is, but I do want to avoid
duplicate documents.
Effectively using couch as an indexed content addressable storage.

Since couch calculates a hash/digest to manage revisions it would seem
fairly sensible and efficient if this was used for the ID.

If I generate an id as an md5 - I am wary that the couch calculated value
will be different due to minor differences in the data before/after
transmission.
That would also duplicate processing.

Thanks for any input

Regards

Dave

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message