Wiki source for MarkLogicDeldir


Show raw source

======Mark Logic Command: deldir======
Deletes documents on a Mark Logic server

====Synopsis====
deldir [-c uri|-connect uri] dir [dir ...]

====Description====
Deletes directories and all documents under that directory residing on a Mark Logic server.
Directories are specified by the URI used to store the document and should end in a /

||-c,connect uri||Use the connection string instead of $MLCONNECT||
||dir|| uri of the directory to delete||

Directories should end in a /

====Example====
Assuming the prefix "ml" is imported as the marklogic module, delete the test.xml document

%%
ml:deldir /MyDir/
%%

To delete a document use [[MarkLogicDel del]]


====Implementation====

deldir is implemented as an xsh script which simply calls query. The source of the script is

%%
import module ml=org.xmlsh.marklogic
for uri ; do
ml:query -q "xdmp:directory-delete(\"$uri\")"
done
%%






----
[[ModuleMarkLogic MarkLogic Extension Module]]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki