Warm tip: This article is reproduced from stackoverflow.com, please click
javascript json marklogic marklogic-9 temporal

How to use xdmp.Spawn() to do a temporal delete in MarkLogic 9?

发布于 2020-05-06 17:14:33

My data set is very huge and I have a search query (cts.uris) constructed with particular parameters that returns me the sequence of all the URIs of the documents. I want to use a xdmp.spawn() with temporal.documentDelete() so that I can delete all of my data from the search results.

When I use temporal.documentDelete() on a loop directly it gets timed out because of the said huge data set. The function can contain 2 parameters: Collection name & directory name.

I'm using JS and my documents are all JSONs.

Questioner
Mehul
Viewed
68
grtjn 2020-02-21 17:56

I highly recommend using an external tool to orchestrate the batching up, and processing. Tools like NiFi could work for this, but Corb2 is also good option. Here some relevant resources on that tool:

HTH!