If security is important, keep http://en.wikipedia.org/wiki/Md5#Security in mind and use a stronger hash function. MarkLogic also provides members of the http://en.wikipedia.org/wiki/SHA2 family.
https://docs.marklogic.com/xdmp:sha256 https://docs.marklogic.com/xdmp:sha384 https://docs.marklogic.com/xdmp:sha512 The larger point of this thread is worth repeating: the identity of a given document is often content-specific or application-specific. No single built-in function will solve this problem in every case. In many cases it's best to select a few node values specific to the content, perhaps with some canonicalization. Then say "if these values are the same, then the documents are the same". -- Mike On 18 Jul 2014, at 05:13 , David Lee <[email protected]> wrote: > This works well for the purposes of 'sync' like tools - where it is useful to > assert > A) If the MD5 of the new *file* is different than the MD5 of the last > *file* then > the document *MAY* be different > B) If the MD5 of the new *file* is identical to the MD5 of the last > *file* then > the document *MUST* be the same. _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
