Loading TOC...

flexrep.pullSetTargetId

flexrep.pullSetTargetId(
   pull as element(flexrep.pull),
   target-id as (Number|String)
) as element(flexrep.pull)

Summary

This function sets the ID of the replication target for the specified pull replication configuration.

Parameters
pull The pull replication configuration obtained by the flexrep.pullGet function.
target-id The ID of the replication target.

Example

const flexrep = require('/MarkLogic/flexrep');

  declareUpdate();
  let pullConfig = flexrep.pullGet(13991089731050213376, true);
  let pullCfg = flexrep.pullSetTargetId(pullConfig, 11130470845627037840);

  flexrep.pullInsert(pullCfg);
  
  //Sets the ID of the replication target for the specified pull configuration.
   

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