[MarkLogic Dev General] xdmp:collection-delete()

Geert Josten geert.josten at dayon.nl
Wed Mar 7 12:14:33 PST 2012


Hi Palani,



Sure only 50 docs had been added to that collection? You can test that
easily using count(collection(“Test”)), or for a bit more speed
xdmp:estimate(collection(“Test”))



Kind regards,

Geert



*Van:* general-bounces at developer.marklogic.com [mailto:general-bounces at deve
loper.marklogic.com] *Namens *Palani TT
*Verzonden:* woensdag 7 maart 2012 20:10
*Aan:* general at developer.marklogic.com
*Onderwerp:* [MarkLogic Dev General] xdmp:collection-delete()



Hi,



I am trying to understand the behavior of this function. My requirement was
to delete the records in a particular collection. I had like 2000 records
under a particular userid/folder. I moved 50 records from that userid to a
collection named "Test" using xdmp:document-set-collections() function.
After that, I wanted to delete the collection "Test" by invoking the
function xdmp:collection:delete(). What happened was all the 2000 records
under that particular userid/folder got deleted when I thought only the 50
records were supposed to get deleted. Can anyone please, explain this
behavior?



Thanks,

Palani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120307/e606036d/attachment.html 


More information about the General mailing list