Reputation: 73
I have a duplicate document URI in our MarkLogic database which causes queries to fail so I just want to delete it. So...
xquery version '1.0-ml';
xdmp:document-delete("the doc uri")
but this gives
[1.0-ml] XDMP-DBDUPURI: xdmp:document-delete("the doc uri") -- URI the doc uri found in forests forest01 and forest02
Anyone any ideas on how to delete this document?
(I've tried disabling one of the forests but that doesn't work)
Upvotes: 1
Views: 1032
Reputation: 21
Error: XDMP-DBDUPURI: fn:doc("/test.xml") -- URI /test.xml found in forests FOREST-1 and FOREST-2 with ts=14545
Answer: We can't delete it directly using just xdmp:document-delete() which throws this XDMP-DBDUPURI error again. To Resolve it, please delete it from one forest using the following query. Hope this helps!
Upvotes: 0
Reputation: 20414
I'm curious to learn how you were able to create two docs with the same uri, that is not something you can achieve normally. I have seen something like that only once in the past years. It might be still listed on http://marklogic.markmail.org/ though couldn't find it myself.
Instead of disabling the Forests, you perhaps should disconnect them. First forest01, reconnect it, and then disconnect forest02. Go to the Forests overview page in the Admin interface, and simply select a different or no database from the appropriate dropdown.
HTH!
Upvotes: 1