MarkLogic - 从临时集合中永久删除所有文档

MarkLogic - Permanently delete all documents from temporal collection

MarkLogic 版本:9.0-6.2

有没有办法从临时集合中物理删除所有文档,甚至删除集合本身(如 xdmp.collectionDelete 非临时集合)。

我们尝试了 temporal.collectionRemove,但只有当临时集合为空时才有效。

我们还尝试循环遍历时间集合并应用 temporal.documentDelete 但这只会结束系统结束时间,但文档实际上是可用的并且可以通过搜索返回。

提前致谢!

要刷新整个数据库(显然不是用于生产),您可以使用 xdmp.forestClear.

仅刷新一个特定时间集合的时间文档:遍历它们(可能成批),并使用 temporal.documentWipe.

您可能需要 'protect' 每个文档首先使用 temporal.documentProtect,持续时间为零秒。

HTH!