Loading TOC...

xdmp:forest-validate-replica-index

xdmp:forest-validate-replica-index(
   $forest-IDs as xs:unsignedLong*,
   $options as xs:string*
) as empty-sequence()

Summary

Validate index data for the database replica forests of the specified forests. Log results in ErrorLog.txt. Optionally repair the index data.

Parameters
$forest-IDs Forest ID of the master forests
$options Options. Default value is empty sequence. Valid values include: "repair" - perform repair on the replica if index data discrepancy is found.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-forest-validate-replica-index

http://marklogic.com/xdmp/privileges/xdmp-forest-validate-replica-index/forest/{id}

http://marklogic.com/xdmp/privileges/xdmp-forest-validate-replica-index/database/{id}

Usage Notes

To validate database replication on a database, find all the open forests in the database and use xdmp:forest-validate-replica-index on each forest.

Example

xdmp:forest-validate-replica-index(
  xdmp:forest-open-replica(xdmp:database-forests($dbid)),("repair"))
=> ()

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