MarkLogic Server 11.0 Product Documentation
cpf.documentSetStatecpf.documentSetState(
doc as String,
state as String
) as null
Summary
Set the document's state to the given state.
Parameters |
doc |
The URI of the document.
|
state |
The new state of the document.
|
Usage Notes
Setting a document's state may trigger content processing. If the document
is currently being actively processed by the content processing framework,
changing its state may have unexpected results. Manually setting the
document's state should therefore be done only on documents whose processing
status is "done".
Example
const cpf = require('/MarkLogic/cpf/cpf');
declareUpdate();
cpf.documentSetState('/myDocs/example.xml', xs.anyURI('http://marklogic.com/states/reprocess'));
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.