MarkLogic Server 11.0 Product Documentation
flexrep.inboundFilterCreate

flexrep.inboundFilterCreate(
   filter-module as String,
   filter-options as element(flexrep.filterOptions)?
) as element(flexrep.inboundFilter)

Summary

This function creates an inbound filter element.

Parameters
filter-module The name of the filter module (e.g. "/my-filter.xqy").
filter-options Options to apply when invoking an outbound filter module. Specify the options as an XML element named filter-options in the "flexrep" namespace. The options element can contain any of the options from xdmp.invoke. The option child elements from xdmp:invoke must be in the "xdmp:eval" namespace.

Example

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

declareUpdate();
flexrep.inboundFilterInsert(
  flexrep.inboundFilterCreate(
    "/my-inbound-filter.xqy",
    fn.head(xdmp.unquote('<flexrep:filter-options xmlns:flexrep="http://marklogic.com/xdmp/flexible-replication">' +
      '<modules>{xdmp:database("my-modules-database")}</modules>' +
      '<root>/some/directory/</root>' +
    '</flexrep:filter-options>')).root));
   

Required Privileges

http://marklogic.com/xdmp/privileges/flexrep-admin

Powered by MarkLogic Server | Terms of Use | Privacy Policy