flexrep.inboundFilterCreate( filter-module as String, filter-options as element(flexrep.filterOptions)? ) as element(flexrep.inboundFilter)
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.
|
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));
http://marklogic.com/xdmp/privileges/flexrep-admin
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.