MarkLogic Server 11.0 Product Documentation
info:unload

info:unload(
   $ticket-id as xs:string,
   [$database as xs:string*],
   [$batch-size as xs:positiveInteger?]
) as empty-sequence()

Summary

[DEPRECATED] This function deletes all of the documents associated with the specified $ticket-id from one or more databases. The documents are deleted from the database associated with the ticket, as well as any additional databases specified by the $database parameter. The ticket status is "unloading" while the delete is in progress and "unloaded" when complete. A ticket may not be unloaded if its status is "active". If errors are encountered during the unloading process, an exception is thrown and the ticket status is set to "unload-aborted".

Parameters
ticket-id The id of the ticket associated with the documents to be deleted.
database One or more database names. If no database is specified, only the documents from the database logged in the ticket are cleared. If databases are specified, documents associated with the ticket are deleted from those databases in addition to the database logged in the ticket.
batch-size The number of documents to delete in a single transaction. If not specified, the default value of 5,000 is used.

Example

  xquery version "1.0-ml"; 

  import module namespace info = "http://marklogic.com/appservices/infostudio"  
      at "/MarkLogic/appservices/infostudio/info.xqy";

  info:unload("/tickets/ticket/4920103524656746726")

  (: Deletes all of the documents associated with the ticket from the database
     specified in the ticket. :)
     
Powered by MarkLogic Server | Terms of Use | Privacy Policy