I am trying to delete a large number of files uploaded to the MarkLogic database. The number of files in the directory that I want to delete is more than 100,000. I usually use two methods to delete files in the query console. Each file in the directory is indexed.
for $x in xdmp:directory("/English/","infinity")
return xdmp:document-delete(fn:document-uri($x))
and
xdmp:directory-delete("/English/")
When I execute any of the above methods, I get a "Time limit exceeded" which interrupts the operation.
My question
- Is there any other better way to delete a bunch of files?
- If not, is there a way to ignore XDMP-EXTIME or SVC-EXTIME?
source
share