Loading TOC...

MarkLogic Server 11.0 Product Documentation
cpf.documentSetState

cpf.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'));
   

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