04 June 2015 07:14 PM
Internally, MarkLogic Server maps URIs to hash values. Hash values are just numbers. For internal operations, numbers are easier to process and are more performant than strings. We refer the URI hash as a URI Key.
Where would I see a URI key?
Sometimes, URI Keys will appear in the MarkLogic Error Logs. For example, the MarkLogic Lock Manager manages document locks. Internally, the lock manager in each forest doesn't deal with URIs, it only deals with URI keys. When logging messages, the lock manager helpfully tries to turn the URI key into a URI to be more human readable. It does that by looking up and retrieving the document URI matching that URI key. If the reporting forest doesn't have a document to match the URI key, it will reports a URI key instead of a URI.
For example, if the 'Lock Trace' trace event is enabled, you may see events logged that look like either of the following lines:
The first line shows a URI (
How can I find a URI key for a URI?
To can turn a URI (
You may want to generate the URI key in order to scan an Error Log file for reference to that key.
How can I find the URI or document for a URI key?
You can check the entire database by using
xquery version '1.0-ml';