pkg:install( $pkgname as xs:string ) as pkgins:install($pkgname)
[DEPRECATED: use cma:generate-config
and
cma:apply-config
instead.]
Parameters | |
---|---|
pkgname | The name of the package to install. |
Only users with the admin
role may install packages.
Installing a package creates a ticket. Use info:ticket
to check the status of the ticket.
Modifying some settings requires a server restart. If package installation requires a server restart to complete, the returned result directs you to restart.
The returned status reports success or failure in
the pkg:result-status
child element. If the installation
fails, the live configuration is unchanged and errors are reported.
Attempting to install two or more packages concurrently may leave your configuration in an indeterminate state.
(: install a package previously created on the server :) import module namespace pkg = "http://marklogic.com/manage/package" at "/MarkLogic/manage/package/package.xqy"; pkg:install("mypackage") => The settings in "mypackage are applied and a status is returned, indicating success or failure. For example: <install-status xmlns="http://marklogic.com/manage/package"> <success>true</success> <restart>false</restart> <ticket-id>/tickets/ticket/10368962049703559638</ticket-id> <revert-uri>/manage/v2/tickets/10368962049703559638/revert</revert-uri> </install-status>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.