Loading TOC...

xdmp.documentPutMetadata

xdmp.documentPutMetadata(
   $uri as String,
   $metadata as Object
) as null

Summary

Adds metadata to the document. If any key already exists in the document metadata, the new specified value replaces the old one. The string value of a non-string metadata value is used for persistence.

Parameters
$uri The document URI.
$metadata Metadata in the key value pairs to set on the document.

Example

declareUpdate();
xdmp.documentPutMetadata(uri, {“a”,1})

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.