|
|
admin:appserver-add-request-blackout(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$request-blackouts as element(gr:request-blackout)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a request blackout specification for a
appserver to a configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The id of the appserver (for example,
xdmp:server("myAppserver")).
|
$request-blackouts
:
The request blackout specification(s), typically the result of
an admin:appserver-one-time-request-blackout or
an admin:appserver-recurring-request-blackout call
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $app-id := xdmp:server("myAppserver")
let $requestspec := admin:appserver-one-time-request-blackout((),(),
xs:dateTime("2008-02-14T09:45:00"),
(), xs:dayTimeDuration("PT3H") )
return
admin:appserver-add-request-blackout($config, $app-id, $requestspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-copy(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$target-group-id as xs:unsignedLong?,
|
|
$appserver-name as xs:string,
|
|
$port as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function creates a new App Server specification with the
same settings as the App Server with the specified ID.
The new App Server configuration will have the specified name.
You can copy the App Server to a new one either in the same
group (by specifying $old-group-id and $new-group-id with
the same group ID) or in a different group.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$target-group-id
:
The optional group ID of the new group to which the
App Server is copied. If no ID is provided, the appserver
will be copied to the same group it exists in.
Typically, this is the result
of an admin:group-get-id call.
|
$appserver-name
:
The new name for the App Server.
|
$port
:
The port number for the new App Server.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $group-id := admin:group-get-id($config, "Default")
let $appserver-id := admin:appserver-get-id($config, $group-id,
"myAppServer")
return
admin:appserver-copy($config, $appserver-id, $group-id,
"myNewAppServer", 8012)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-get-authentication(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong
|
| ) as xs:string |
|
 |
Summary:
This function returns the authentication scheme
(basic, digest, digestbasic, or application-level)
configured for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-get-authentication($config,
admin:appserver-get-id($config, $groupid, "myAppServer"))
|
|
|
|
admin:appserver-get-type(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong
|
| ) as xs:string |
|
 |
Summary:
This function returns the type of appserver with the
specified ID. It will be either "http", "xdbc", or "WebDAV".
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-get-type($config,
admin:appserver-get-id($config, $groupid, "myAppServer"))
(: returns "http", "xdbc", or "WebDAV" :)
|
|
|
|
admin:appserver-recurring-request-blackout(
|
|
$users as xs:unsignedLong*,
|
|
$roles as xs:unsignedLong*,
|
|
$days as xs:string*,
|
|
$start-time as xs:time?,
|
|
$end-time as xs:time?,
|
|
$duration as xs:duration?
|
| ) as element(gr:request-blackout) |
|
 |
Summary:
This function constructs a request-blackout specification.
|
Parameters:
$users
:
A sequence of user ID(s) that the request blackout applies too.
|
$roles
:
A sequence of role ID(s) that the request blackout applies too.
|
$days
:
The day(s) of the week. Must be a sequence of zero
or more of monday, tuesday,
wednesday, thusday,
friday, saturday,
sunday.
|
$start-time
:
A time for the request blackout to start.
|
$end-time
:
A time for the request blackout to end.
|
$duration
:
The amount of time for the blackout to last.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:appserver-recurring-request-blackout((),(), "monday",
xs:time("09:45:00"), xs:time("11:45:00"), () )
(: returns the request-blackout specification :)
|
|
|
|
admin:appserver-set-address(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function changes the IP Address in the configuration for
the specified App Server to the specified address. Changing
the address is a "cold" operation; when you use
admin:save-configuration to save the
configuration, it will automatically restart
MarkLogic Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The new value for the IP address for the specified App
Server.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-address(
$config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"127.0.0.1")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-authentication(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the authentication scheme in the
configuration for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The authentication scheme (basic,
digest, digestbasic,
or application-level).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-authentication($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"digest")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-backlog(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedInt
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the value in the configuration of
the backlog (the maximum number of pending connections
allowed on the HTTP socket) for the specified App Server.
This is a "cold" operation; when you use
admin:save-configuration to save the
configuration, it will automatically restart
MarkLogic Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The new integer value for the backlog.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-backlog($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
64)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-collation(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the default collation in the
configuration for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
A valid collation URI (for example,
http://marklogic.com/collation/).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-collation($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"http://marklogic.com/collation/")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-database(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the value in the configuration of
the database for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The database ID for the database to set as the
database for the specified App Server.
|
|
Usage Notes:
Any database whose ID you pass into this function must exist when
the transaction begins, otherwise an exception is thrown. If you
need to create the database, do so in a separate transaction
before using them in in this function.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-database($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
xdmp:database("myDatabase"))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-default-user(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the default user (for use with
application-level authentication) in the configuration
for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The user ID of the user to set as the default user.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-default-user($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
xdmp:eval('
xquery version "1.0-ml";
import module "http://marklogic.com/xdmp/security"
at "/MarkLogic/security.xqy";
sec:uid-for-name("annabelle")', (),
<options xmlns="xdmp:eval">
<database>{xdmp:security-database()}</database>
</options>))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-default-xquery-version(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the default XQuery version setting
in the configuration for this App Server. This setting
determines the XQuery dialect used in queries against
this App Server when one is not explicitly specified
in the XQuery version declaration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default XQuery version value, one of
1.0-ml, 1.0, or
0.9-ml.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-default-xquery-version($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"1.0-ml")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-enabled(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:boolean
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the enabled state in the configuration
for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The enabled state of the App Server to set, true for
enabled and false for disabled.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-enabled($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-last-login(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedLong?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the value in the configuration of
the last login database for the specified App Server. If the value
is equal to 0, then the last-login feature is disabled for this
appserver.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The database ID for the database to set as the
database for the specified App Server. To disable the
last-login feature, use the empty sequence or 0 for this
value
|
|
Usage Notes:
Any database whose ID you pass into this function must exist when
the transaction begins, otherwise an exception is thrown. If you
need to create the database, do so in a separate transaction
before using them in in this function.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-last-login($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
xdmp:database("Last-Login"))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-modules-database(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as item()
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the value in the configuration of
modules database for the specified App Server to the
specified database ID.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The database ID for the database to set as the modules
database. To specify the filesystem, use 0 or "file-system"
|
|
Usage Notes:
Any database whose ID you pass into this function must exist when
the transaction begins, otherwise an exception is thrown. If you
need to create the database, do so in a separate transaction
before using them in in this function.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-modules-database($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
xdmp:database("Modules"))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-multi-version-concurrency-control(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the multi version concurrency
control value in the configuration for this App
Server. This option specifies how the latest
timestamp is chosen for lock-free queries. When set
to contemporaneous, the server chooses
the latest timestamp for which any
transaction is known to have committed, even though
there still may be other transactions for that
timestamp that have not yet fully committed. Queries
will see more timely results, but may block waiting
for contemporaneous transactions to fully commit.
When set to nonblocking, the server
chooses the latest timestamp for which all
transactions are known to have committed, even though
there may be a later timestamp for which another
transaction has committed. Queries won't block
waiting for transactions, but they may see less timely
results.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The multi version concurrency control value, one of
contemporaneous or
nonblocking.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-multi-version-concurrency-control($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"nonblocking")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-byte-order-mark(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether for the specified App Server
the output sequence of octets is or is not to be preceded
by a byte order mark by default.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for outputting a byte order mark, one of
yes, no,
or default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-byte-order-mark($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"yes")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-encoding(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the value for the default output encoding
in the configuration for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for outputting characters. The value
must be the name of a valid character set (for example,
UTF-8, ASCII, and so on.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-encoding($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"ascii")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-escape-uri-attributes(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether or not to apply Unicode
normalization, percent-encoding, and HTML escaping when
serializing URI attributes by default for the specified
App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for escaping serialized URI attributes,
one of yes, no,
or default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-escape-uri-attributes($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"no")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-include-content-type(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether or not to include the
content-type declaration when serializing nodes for
the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for including a content-type declaration,
one of yes, no,
or default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-include-content-type($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"no")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-include-default-attributes(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether for the specified App
Server, attributes defaulted with a schema should be
included in the serialization.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for including default attributes in
serialization, one of yes, no,
or default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-include-default-attributes($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"yes")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-indent(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether or not to pretty-print
(indent) typed XML (that is, XML for which there is an
in-scope schema) output for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for indenting output for typed XML,
one of yes, no,
or default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-indent($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"no")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-indent-untyped(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether or not to pretty-print
(indent) untyped XML (that is, XML for which there is no
in-scope schema) output for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for indenting output for typed XML,
one of yes, no,
or default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-indent-untyped($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"yes")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-media-type(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the default serialization media
type for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for output media type,
a MIME type string such as text/xml.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-media-type($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"text/plain")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-method(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures the default output serialization
method for the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for the serialization method, one of
xml, html,
xhtml, text, or
default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-method($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"html")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-normalization-form(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets a Unicode normalization form to be
applied by default to serialized output for the specified
App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for the output normalization form, one of
none, NFC, NFD,
or NFKD.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-normalization-form($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"NFKD")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-omit-xml-declaration(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether serialized output for the
specified App Server should omit the inclusion of an XML
declaration by default.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for omitting the XML declaration,
one of yes, no,
or default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-omit-xml-declaration($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"yes")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-sgml-character-entities(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the SGML character entity output
setting in the configuration for the specified App Server.
The SGML setting determines how characters that can be
represented as SGML entites are serialized upon output
by default in a query against the specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for outputting SGML entities, one of
none, default,
math, or pub.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-sgml-character-entities($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"default")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-standalone(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether for the specified App Server
an XML delcaration in serialized output should include
a standalone attribute by default.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
For a value of yes or no,
include standalone=value in
the XML declaration; for a value of omit,
omit standalone=.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-standalone($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"yes")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-undeclare-prefixes(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function configures whether by default, serialization
for the specified App Server should undeclare the namespace
prefix of any child element that does not bind the prefix
of its parent element.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The default value for undeclaring prefixes, one of
yes, no, or default.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-undeclare-prefixes($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"yes")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-output-version(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function stipulates a version of the default
serialization method associated with the specified App
Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
A release version string, one of 1.0
or 4.0.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-output-version($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"1.0")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-port(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedInt
|
| ) as element(configuration) |
|
 |
Summary:
This function changes the port in the configuration for
the specified App Server to the specified number. Changing
the port is a "cold" operation; when you use
admin:save-configuration to save the
configuration, it will automatically restart
MarkLogic Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The new port number.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-port($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
1234)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-pre-commit-trigger-depth(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedInt
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the maximum depth (how many triggers can
cause other triggers to fire, which in turn cause others
to fire, and so on) in the configuration for the specifed
App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The maximum depth (how many triggers can cause other
triggers to fire, which in turn cause others to fire,
and so on) for pre-commit triggers.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-pre-commit-trigger-depth($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
10000)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-privilege(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function sets an execute privilege in the configuration
for the specified App Server. When a privilege is set,
the user who makes a request to the App Server must have
been granted (via a role, either directly or indirectly)
the specified privilege.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The privilege ID of an execute privilege needed to
access this App Server.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-privilege($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
xdmp:eval('
xquery version "1.0-ml";
import module "http://marklogic.com/xdmp/security"
at "/MarkLogic/security.xqy";
sec:get-privilege("http://marklogic.com/my.uri",
"execute")/sec:privilege-id',
(),
<options xmlns="xdmp:eval">
<database>{xdmp:security-database()}</database>
</options>))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-root(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function changes the root for a specified App Server
to the newly specified value.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The new value for the root. The root must be either a
fully qualified path (for example,
/space/myRoot or c:/space/myRoot)
or a relative path (for example, myRoot);
relative paths are resolved relative to the directory in
which MarkLogic Server is installed.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-root($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
"myNewRoot")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:appserver-set-ssl-allow-sslv3(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:boolean
|
| ) as element(configuration) |
|
 |
Summary:
This function enables or disables the SSL v3 protocol for the specified App
Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
A boolean value, fn:true() to enable, fn:false() to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $appServer := admin:appserver-get-id($config,
admin:group-get-id($config, "Default"),
"Docs")
return
admin:appserver-set-ssl-allow-sslv3($config, $appServer, fn:false())
(: Disables SSL v3 for the "Docs" App Server. :)
|
|
|
|
admin:appserver-set-ssl-allow-tls(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:boolean
|
| ) as element(configuration) |
|
 |
Summary:
This function enables or disables the TLS protocol for the specified App
Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
A boolean value, fn:true() to enable, fn:false() to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $appServer := admin:appserver-get-id($config,
admin:group-get-id($config, "Default"),
"Docs")
return
admin:appserver-set-ssl-allow-tls($config, $appServer, fn:true())
(: Enables TLS for the "Docs" App Server. :)
|
|
|
|
admin:appserver-set-ssl-certificate-template(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function sets an SSL certificate template for the
specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The id of the certificate template. This would typically be the result of a
pki:insert-template(pki:create-template()) call.
|
|
Example:
xquery version "1.0-ml";
import module namespace pki = "http://marklogic.com/xdmp/pki"
at "/MarkLogic/pki.xqy";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $appServer := admin:appserver-get-id($config,
admin:group-get-id($config, "Default"),
"myAppServer")
let $tid := pki:template-get-id(pki:get-template-by-name("mycert"))
return
admin:appserver-set-ssl-certificate-template(
$config,
$appServer,
$tid)
(: Sets the certificate template, "mycert," for the "myAppServer" App Server. :)
|
|
|
|
admin:appserver-set-ssl-client-certificate-authorities(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedLong*
|
| ) as element(configuration) |
|
 |
Summary:
This function sets one or more client certificate authorities that sign
client certificates for the specified App Server. This function is typically used along with
the pki:insert-trusted-certificates and pki:get-trusted-certificate-ids
functions to import trusted Certificate Authorities for client certificates.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
One or more ids for trusted certificates generated by the certificate authority to be set.
|
|
Example:
xquery version "1.0-ml";
import module namespace pki = "http://marklogic.com/xdmp/pki"
at "/MarkLogic/pki.xqy";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
declare namespace x509 = "http://marklogic.com/xdmp/x509";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
let $appservid := admin:appserver-get-id($config, $groupid, "myAppServer")
let $cert-id :=
for $cert in pki:get-certificates(pki:get-trusted-certificate-ids())
where $cert/x509:cert/x509:subject/x509:commonName eq "Acme Certificate Authority" and
$cert/x509:cert/x509:subject/x509:organizationName eq "Acme Corporation"
return
fn:data($cert/pki:certificate-id)
return
admin:appserver-set-ssl-client-certificate-authorities(
$config,
$appservid,
$cert-id)
(: Locates the trusted certificates from the Certificate Authority, "Acme
Corporation," with the common name of "Acme Certificate Authority" and
adds the Certificate Authority to the list of Client Certificate Authorities
for the App Server, "myAppServer." :)
|
|
|
|
admin:appserver-set-ssl-hostname(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets an SSL hostname for the specified App Server.
The SSL hostname should only be set when a proxy or load
balancer is used to represent multiple servers. In this case, you can
specify an SSL hostname with this function and all instances of the
application server will identify themselves as that host.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The SSL hostname.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $appServer := admin:appserver-get-id($config,
admin:group-get-id($config, "Default"),
"Docs")
return
admin:appserver-set-ssl-hostname($config, $appServer, "AllHost")
(: Sets the SSL hostname for the "Docs" App Server to "AllHost". :)
|
|
|
|
admin:appserver-set-ssl-require-client-certificate(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:boolean
|
| ) as element(configuration) |
|
 |
Summary:
This function determines whether or not a client certificate is required for the
specified App Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
A boolean value, fn:true() to enable, fn:false() to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $appServer := admin:appserver-get-id($config,
admin:group-get-id($config, "Default"),
"Docs")
return
admin:appserver-set-ssl-require-client-certificate($config, $appServer, fn:false())
(: Specifies that the "Docs" App Server does not require a client certificate. :)
|
|
|
|
admin:appserver-set-threads(
|
|
$config as element(configuration),
|
|
$appserver-id as xs:unsignedLong,
|
|
$value as xs:unsignedInt
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the value in the configuration of
the maximum number of threads for the specified App Server.
This is a "cold" operation; when you use
admin:save-configuration to save the
configuration, it will automatically restart
MarkLogic Server.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$appserver-id
:
The ID of the App Server. Typically, this is the result
of an admin:appserver-get-id call.
|
$value
:
The new integer value for the number of threads.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:appserver-set-threads($config,
admin:appserver-get-id($config, $groupid, "myAppServer"),
10)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-backup(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$backups as element(db:database-backup)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds scheduled backup specifications for a
database to a configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("mydatabase")).
|
$backups
:
The scheduled backup specification(s), typically the result of
an admin:database-one-time-backup or
an admin:database-monthly-backup or
an admin:database-weekly-backup call
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $database := xdmp:database("mydatabase")
let $backup := admin:database-one-time-backup("/backup-dir",
xs:dateTime("2008-02-14T09:45:00"),10,true(),true(),true())
return
admin:database-add-backup($config, $database, $backup)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-element-attribute-word-lexicon(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$element-attribute-word-lexicons as element(db:element-attribute-word-lexicon)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds an element attribute word lexicon to the
specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$element-attribute-word-lexicons
:
An element word lexicon specification, typically the result of an
admin:database-element-word-lexicon call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $lexspec := admin:database-element-attribute-word-lexicon("my/namepsace",
"elementname", "", "myAttribute", "http://marklogic.com/collation/" )
return
admin:database-add-element-attribute-word-lexicon($config, $dbid, $lexspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-field-excluded-element(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$excluded-elements as element(db:excluded-element)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds the field excluded
element specification in the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$excluded-elements
:
The excluded elements specification, typically the result of
an admin:database-excluded-element call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("myDatabase")
let $fieldspec := admin:database-excluded-element("http://myuri/namespace",
"element-name")
return
admin:database-add-field-excluded-element($config, $dbid,
"myField", $fieldspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-field-included-element(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$included-elements as element(db:included-element)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds the field included
element specification tn the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$included-elements
:
The included elements specification, typically the result of
an admin:database-included-element call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("myDatabase")
let $fieldspec := admin:database-included-element("http://myuri/namespace",
"element-name", 1.0, "", "myAttribute", "some value")
return
admin:database-add-field-included-element($config, $dbid,
"myField", $fieldspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-geospatial-element-attribute-pair-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$geospatial-element-attribute-pair-indexes as element(db:geospatial-element-attribute-pair-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a geospatial element attribute
pair index to the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$geospatial-element-attribute-pair-indexes
:
A geospatial element attribute pair index specification, typically
the result of an
admin:database-geospatial-element-attribute-pair-index
call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $geospec := admin:database-geospatial-element-attribute-pair-index(
"/my/namespace", "elementname", "/my/namespace", "lat",
"/my/namespace", "long", "wgs84", fn:false() )
return
admin:database-add-geospatial-element-attribute-pair-index($config,
xdmp:database("myDatabase"), $geospec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-geospatial-element-child-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$geospatial-element-child-indexes as element(db:geospatial-element-child-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a geospatial element child index to
the specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$geospatial-element-child-indexes
:
A geospatial element child index specification, typically
the result of
an admin:database-geospatial-element-child-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $geospec := admin:database-geospatial-element-child-index("/my/namespace",
"elementname", "/my/namespace", "child-element",
"wgs84", fn:false() )
return
admin:database-add-geospatial-element-child-index($config, $dbid, $geospec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-geospatial-element-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$geospatial-element-indexes as element(db:geospatial-element-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a range element index to the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$geospatial-element-indexes
:
A geospatial element index specification, typically the result of
an admin:database-geospatial-element-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $geospec := admin:database-geospatial-element-index("/my/namespace",
"elementname", "wgs84", fn:false() )
return
admin:database-add-geospatial-element-index($config, $dbid, $geospec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-geospatial-element-pair-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$geospatial-element-pair-indexes as element(db:geospatial-element-pair-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a geospatial element pair index to
the specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$geospatial-element-pair-indexes
:
A geospatial element pair index specification, typically
the result of
an admin:database-geospatial-element-pair-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $geospec := admin:database-geospatial-element-pair-index("/my/namespace",
"elementname", "/my/namespace", "lat",
"/my/namespace", "long", "wgs84", fn:false() )
return
admin:database-add-geospatial-element-pair-index($config,
xdmp:database("myDatabase"), $geospec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-merge-blackout(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$merge-blackouts as element(db:merge-blackout)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a merge blackout specification for a
database to a configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$merge-blackouts
:
The merge blackout specification(s), typically the result of
an admin:database-one-time-merge-blackout or
an admin:database-recurring-merge-blackout call
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("myDatabase")
let $mergespec := admin:database-one-time-merge-blackout(500, "lower",
xs:dateTime("2008-02-14T09:45:00"),
(), xs:dayTimeDuration("PT3H") )
return
admin:database-add-merge-blackout($config, $dbid, $mergespec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-range-element-attribute-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$attribute-indexes as element(db:range-element-attribute-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a range element attribute index to the
specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$attribute-indexes
:
An element attribute range index specification, typically the result of an
admin:database-range-element-attribute-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $rangespec := admin:database-range-element-attribute-index("string",
"/my/namespace", "elementname", "", "myAttribute",
"http://marklogic.com/collation/", fn:false() )
return
admin:database-add-range-element-attribute-index($config, $dbid, $rangespec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-range-element-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$range-indexes as element(db:range-element-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a range element index to the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$range-indexes
:
An element range index specification, typically the result of an
admin:database-range-element-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $rangespec := admin:database-range-element-index("string", "/my/namespace",
"elementname", "http://marklogic.com/collation/",
fn:false() )
return
admin:database-add-range-element-index($config, $dbid, $rangespec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-range-field-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$range-indexes as element(db:range-field-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds a range field index to the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$range-indexes
:
An field range index specification, typically the result of an
admin:database-range-field-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $rangespec := admin:database-range-field-index("string",
"fieldname", "http://marklogic.com/collation/",
fn:false() )
return
admin:database-add-range-field-index($config, $dbid, $rangespec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-add-word-query-included-element(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$included-elements as element(db:included-element)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds the word query included
element specification to the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$included-elements
:
The included elements specification, typically the result of
an admin:database-included-element call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("myDatabase")
let $wqspec := admin:database-included-element("http://myuri/namespace",
"element-name", 1.0, "", "myAttribute", "some value")
return
admin:database-add-word-query-included-element($config, $dbid, $wqspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-daily-backup(
|
|
$backup-dir as xs:string,
|
|
$backup-period as xs:positiveInteger,
|
|
$start-time as xs:time,
|
|
$max-backups as xs:unsignedLong,
|
|
$backup-security-db as xs:boolean,
|
|
$backup-schemas-db as xs:boolean,
|
|
$backup-triggers-db as xs:boolean,
|
|
[$include-replicas as xs:boolean],
|
|
[$journal-archiving as xs:boolean?],
|
|
[$journal-archive-path as xs:string?],
|
|
[$lag-limit as xs:unsignedLong?]
|
| ) as element(db:database-backup) |
|
 |
Summary:
This function constructs a daily scheduled database backup.
|
Parameters:
$backup-dir
:
The directory to save the backup.
|
$backup-period
:
The number of days to elapse between each backup
|
$start-time
:
The time of day of the backup, in 24:00:00 notation.
|
$max-backups
:
The maximum number of backups to keep. When you reach the specified
maximum number of backups, the next backup will delete the oldest
backup.
Specify 0 to keep an unlimited number of backups.
|
$backup-security-db
:
Whether to backup the security database alongside the current
backup.
|
$backup-schemas-db
:
Whether to backup the schemas database alongside the current
backup.
|
$backup-triggers-db
:
Whether to backup the triggers database alongside the current
backup.
|
$include-replicas
(optional):
If set to false, do not include the replicas in
the backup. The default is true, which means to
include all replicas in the backup.
|
$journal-archiving
(optional):
Whether or not to enable journal archiving. Defaults to false.
|
$journal-archive-path
(optional):
Path for where archived journals are stored. Defaults to the backup data directory.
|
$lag-limit
(optional):
Maximum difference in seconds that the archived journal can lag behind its forest's active journal. Defaults to 900.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-daily-backup("/backup-dir", 2,
xs:time("19:45:00"),10,true(),true(),true())
(: returns the daily database backup specification :)
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-daily-backup("/backup-dir", 2,
xs:time("19:45:00"),10,true(),true(),true(),false(),true(),(),500)
(: returns the daily database backup specification :)
|
|
|
|
admin:database-delete-element-attribute-word-lexicon(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$lexicons as element(db:element-attribute-word-lexicon)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes an element attribute word lexicon for the
specified database from the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$lexicons
:
An element attribute word lexicon specification, typically the result of an
admin:database-element-attribute-word-lexicon call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $lexspec := admin:database-element-attribute-word-lexicon("my/namepsace",
"elementname", "", "myAttribute", "http://marklogic.com/collation/" )
return
admin:database-delete-element-attribute-word-lexicon($config, $dbid, $lexspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-field-excluded-element(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$excluded-elements as element(db:excluded-element)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes the field excluded
element specification in the specified
database from the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$excluded-elements
:
The excluded elements specification, typically the result of
an admin:database-excluded-element call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("myDatabase")
let $fieldspec := admin:database-excluded-element("http://myuri/namespace",
"element-name")
return
admin:database-delete-field-excluded-element($config, $dbid,
"myField", $fieldspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-field-included-element(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$included-elements as element(db:included-element)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes the field included
element specification in the specified
database from the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$included-elements
:
The included elements specification, typically the result of
an admin:database-included-element call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("myDatabase")
let $fieldspec := admin:database-included-element("http://myuri/namespace",
"element-name", 1.0, "", "myAttribute", "some value")
return
admin:database-delete-field-included-element($config, $dbid,
"myField", $fieldspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-geospatial-element-attribute-pair-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$indexes as element(db:geospatial-element-attribute-pair-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes a geospatial element attribute
pair index in the specified
database from the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$indexes
:
A geospatial element attribute pair index specification,
typically the result of an
admin:database-geospatial-element-attribute-pair-index
call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $geospec := admin:database-geospatial-element-attribute-pair-index(
"/my/namespace", "elementname", "/my/namespace", "lat",
"/my/namespace", "long", "wgs84", fn:false() )
return
admin:database-delete-geospatial-element-pair-index($config,
xdmp:database("myDatabase"), $geospec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-geospatial-element-child-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$geospatial-element-child-indexes as element(db:geospatial-element-child-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes a geospatial element child index for the
specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$geospatial-element-child-indexes
:
A geospatial element child index specification, typically
the result of an
admin:database-geospatial-element-child-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $geospec := admin:database-geospatial-element-child-index("/my/namespace",
"elementname", "/my/namespace", "child-element", "wgs84", fn:false() )
return
admin:database-delete-geospatial-element-child-index($config, $dbid, $geospec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-geospatial-element-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$geospatial-element-indexes as element(db:geospatial-element-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes a geospatial element index for the
specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$geospatial-element-indexes
:
A geospatial element index specification, typically the result of an
admin:database-geospatial-element-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $geospec := admin:database-geospatial-element-index("/my/namespace",
"elementname", "wgs84", fn:false() )
return
admin:database-delete-geospatial-element-index($config, $dbid, $geospec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-geospatial-element-pair-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$geospatial-element-pair-indexes as element(db:geospatial-element-pair-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes a geospatial element pair index for
the specified database from the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$geospatial-element-pair-indexes
:
A geospatial element pair index specification, typically
the result of
an admin:database-geospatial-element-pair-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $geospec := admin:database-geospatial-element-pair-index("/my/namespace",
"elementname", "/my/namespace", "lat",
"/my/namespace", "long", "wgs84", fn:false() )
return
admin:database-delete-geospatial-element-pair-index($config,
xdmp:database("myDatabase"), $geospec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-range-element-attribute-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$attribute-indexes as element(db:range-element-attribute-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes a range element attribute index for
the specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$attribute-indexes
:
An element attribute range index specification, typically the
result of an
admin:database-range-element-attribute-index call.
|
|
Usage Notes:
Note that the index specification to delete must exist in the
configuration exactly as specified, even if the specification
includes multiple QNames. If you have a range index configuration
that specifies multiple QNames in a single entry, then if you
want to delete the index for only one of the QNames, you must first
delete the range index specification with multiple QNames and then
add the indexes that you do not want to delete.
To see the specifications as they are stored in the configuration,
use admin:database-get-range-element-attribute-index.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $rangespec := admin:database-range-element-attribute-index("string",
"/my/namespace", "elementname", "", "myAttribute",
"http://marklogic.com/collation/", fn:false() )
return
admin:database-delete-range-element-attribute-index($config, $dbid, $rangespec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-range-element-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$range-indexes as element(db:range-element-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes a range element index for the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$range-indexes
:
An element range index specification, typically the result of an
admin:database-range-element-index call.
|
|
Usage Notes:
Note that the index specification to delete must exist in the
configuration exactly as specified, even if the specification
includes multiple QNames. If you have a range index configuration
that specifies multiple QNames in a single entry, then if you
want to delete the index for only one of the QNames, you must first
delete the range index specification with multiple QNames and then
add the indexes that you do not want to delete.
To see the specifications as they are stored in the configuration,
use admin:database-get-range-element-index.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $rangespec := admin:database-range-element-index("string", "/my/namespace",
"elementname", "http://marklogic.com/collation/",
fn:false() )
return
admin:database-delete-range-element-index($config, $dbid, $rangespec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-range-field-index(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$range-indexes as element(db:range-field-index)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes a range field index for the specified
database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$range-indexes
:
A field range index specification, typically the result of an
admin:database-range-field-index call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $rangespec := admin:database-range-field-index("string",
"fieldname", "http://marklogic.com/collation/",
fn:false() )
return
admin:database-delete-range-field-index($config, $dbid, $rangespec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-delete-word-query-included-element(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$included-elements as element(db:included-element)*
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes the word query included
element specification in the specified
database from the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$included-elements
:
The included elements specification, typically the result of
an admin:database-included-element call.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("myDatabase")
let $wqspec := admin:database-included-element("http://myuri/namespace",
"element-name", 1.0, "", "myAttribute", "some value")
return
admin:database-delete-word-query-included-element($config, $dbid, $wqspec)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-foreign-replica(
|
|
$foreign-cluster-id as xs:unsignedLong,
|
|
$foreign-database-id as xs:unsignedLong,
|
|
$connect-forests-by-name as xs:boolean,
|
|
$lag-limit as xs:unsignedInt
|
| ) as element(db:foreign-replica) |
|
 |
Summary:
This function returns a replica database configuration. Use the output of this function
in the admin:database-set-foreign-replicas function to place the
replica database configuration into the cluster configuration.
|
Parameters:
$foreign-cluster-id
:
The id of the foreign cluster containing the replica database.
|
$foreign-database-id
:
The id of the replica database.
|
$connect-forests-by-name
:
Boolean that indicates whether to connect to forests by name. If
fn:true, forests will automatically connect to/from foreign
forests of the same name. If false, forests must be individually
configured to replicate to/from foreign forests. Individual forest settings
override the database level setting.
|
$lag-limit
:
This parameter controls how far (in seconds) the replica may fall behind before the
master stops accepting updates.
If contact with the foreign cluster is lost, a warning will be logged and
master forests will permit updates to proceed with no enforcement of the lag limit.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $fdb := 7746794057802787479
let $cfg := admin:get-configuration()
let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
return admin:database-foreign-replica($fcl, $fdb, fn:true(), 300)
(: Returns the replica database configuration. Use the
admin:database-set-foreign-replicas function to set
the confirguration. :)
|
|
|
|
admin:database-geospatial-element-attribute-pair-index(
|
|
$parent-namespace as xs:string?,
|
|
$parent-localname as xs:string,
|
|
$latitude-namespace as xs:string?,
|
|
$latitude-localname as xs:string,
|
|
$longitude-namespace as xs:string?,
|
|
$longitude-localname as xs:string,
|
|
$coordinate-system as xs:string,
|
|
$range-value-positions as xs:boolean
|
| ) as element(db:geospatial-element-attribute-pair-index) |
|
 |
Summary:
This function constructs a geospatial element attribute
pair index specification.
|
Parameters:
$parent-namespace
:
The namespace of the parent element for the attribute.
|
$parent-localname
:
The local name of the parent element for the attribute.
|
$latitude-namespace
:
The namespace for the element containing the latitude.
|
$latitude-localname
:
The local name for the element containing the latitude.
|
$longitude-namespace
:
The namespace for the element containing the longitude.
|
$longitude-localname
:
The local name for the element containing the longitude.
|
$coordinate-system
:
The coordinate system. Must be one of wgs84 or
raw.
|
$range-value-positions
:
A boolean specifying whether to maintain value postions
in this index (used with co-occurrences).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-geospatial-element-attribute-pair-index("/my/namespace",
"elementname", "/my/namespace", "lat",
"/my/namespace", "long", "wgs84", fn:false() )
(: returns the geospatial element attribute pair index specification :)
|
|
|
|
admin:database-geospatial-element-child-index(
|
|
$parent-namespace as xs:string?,
|
|
$parent-localname as xs:string,
|
|
$namespace as xs:string?,
|
|
$localname as xs:string,
|
|
$coordinate-system as xs:string,
|
|
$range-value-positions as xs:boolean,
|
|
[$point-format as xs:string]
|
| ) as element(db:geospatial-element-child-index) |
|
 |
Summary:
This function constructs a geospatial element child index
specification.
|
Parameters:
$parent-namespace
:
The namespace of the parent element for the attribute.
|
$parent-localname
:
The local name of the parent element for the attribute.
|
$namespace
:
The namespace URI. Specify an empty string if the
element is in no namespace.
|
$localname
:
The local name for the node.
|
$coordinate-system
:
The coordinate system. Must be one of wgs84 or
raw.
|
$range-value-positions
:
A boolean specifying whether to maintain value postions
in this index (used with co-occurrences).
|
$point-format
(optional):
The point format in the data: "point" means latitude precedes longitude (this is the default);
"long-lat-point" means longitude precedes latitude. To use the default value of
"point", simply omit this parameter. Do not specify an empty string.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-geospatial-element-child-index(
"/my/namespace",
"elementname",
"/my/namespace",
"child-element",
"wgs84",
fn:false() )
(: returns the geospatial element child index specification :)
|
|
|
|
admin:database-geospatial-element-pair-index(
|
|
$parent-namespace as xs:string?,
|
|
$parent-localname as xs:string,
|
|
$latitude-namespace as xs:string?,
|
|
$latitude-localname as xs:string,
|
|
$longitude-namespace as xs:string?,
|
|
$longitude-localname as xs:string,
|
|
$coordinate-system as xs:string,
|
|
$range-value-positions as xs:boolean
|
| ) as element(db:geospatial-element-pair-index) |
|
 |
Summary:
This function constructs a geospatial element pair index
specification.
|
Parameters:
$parent-namespace
:
The namespace of the parent element for the attribute.
|
$parent-localname
:
The local name of the parent element for the attribute.
|
$latitude-namespace
:
The namespace for the element containing the latitude.
|
$latitude-localname
:
The local name for the element containing the latitude.
|
$longitude-namespace
:
The namespace for the element containing the longitude.
|
$longitude-localname
:
The local name for the element containing the longitude.
|
$coordinate-system
:
The coordinate system. Must be one of wgs84 or
raw.
|
$range-value-positions
:
A boolean specifying whether to maintain value postions
in this index (used with co-occurrences).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-geospatial-element-pair-index("/my/namespace",
"elementname", "/my/namespace", "lat",
"/my/namespace", "long", "wgs84", fn:false() )
(: returns the geospatial element pair index specification :)
|
|
|
|
admin:database-get-id(
|
|
$config as element(configuration),
|
|
$database-name as xs:string
|
| ) as xs:unsignedLong |
|
 |
Summary:
This function returns the ID for the specified database from the configuration.
The difference between this function and xdmp:database()
is that the ID from
this function can come from a database that has not yet been saved (that is,
from a database that has been created in the same query with the Admin library
but has not yet been saved to the cluster configuration files). This ID
enables you to completely configure a newly created database without the
need to first save the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-name
:
The name of the database.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $config := admin:database-create($config, "myNewDatabase",
xdmp:database("Security"), xdmp:database("Schemas"))
let $databaseID := admin:database-get-id($config, "myNewDatabase")
let $fieldspec := admin:database-field("myField", fn:true() )
let $config := admin:database-add-field($config, $databaseID, $fieldspec)
return
admin:database-attach-forest($config, $databaseID,
xdmp:forest("newForest") )
(: Attaches "newForest" and adds the field, "myField" to the newly created
database, "myNewDatabase" :)
|
|
|
|
admin:database-get-journaling(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong
|
| ) as xs:string |
|
 |
Summary:
This function returns the journaling setting for the
specified database in the configuration. When set
to strict, the journal protects against
MarkLogic Server process failures, host operating
system kernel failures, and host hardware failures.
When set to fast, the journal protects
against MarkLogic Server process failures but not
against host operating system kernel failures or host
hardware failures. When set to off, the
journal does not protect against MarkLogic Server
process failures, host operating system kernel
failures, or host hardware failures.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-get-journaling($config, xdmp:database("myDatabase"))
(: returns the journaling setting :)
|
|
|
|
admin:database-get-tf-normalization(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong
|
| ) as xs:string |
|
 |
Summary:
This function returns the current term-frequency
normalization setting for the database. The returned value is either
(scaled-log), which means to scale the term frequency based on the size of
the document, or unscaled-log, which means to use term frequency as a function
of the actual term frequency in a document, regardless of the document size.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $db := admin:database-get-id($config, "myDatabase")
return
admin:database-get-tf-normalization($config, $db)
(: Returns the term-frequency normalization setting for the database, "myDatabase." :)
|
|
|
|
admin:database-hourly-backup(
|
|
$backup-dir as xs:string,
|
|
$backup-period as xs:positiveInteger,
|
|
$start-minute as xs:nonNegativeInteger,
|
|
$max-backups as xs:unsignedLong,
|
|
$backup-security-db as xs:boolean,
|
|
$backup-schemas-db as xs:boolean,
|
|
$backup-triggers-db as xs:boolean,
|
|
[$include-replicas as xs:boolean],
|
|
[$journal-archiving as xs:boolean?],
|
|
[$journal-archive-path as xs:string?],
|
|
[$lag-limit as xs:unsignedLong?]
|
| ) as element(db:database-backup) |
|
 |
Summary:
This function constructs a hourly scheduled database backup.
|
Parameters:
$backup-dir
:
The directory to save the backup.
|
$backup-period
:
The number of hours to elapse between each backup.
|
$start-minute
:
The number of minutes after the hour to start the backup. Note that this
setting does not add to the backup period value.
|
$max-backups
:
The maximum number of backups to keep. When you reach the specified
maximum number of backups, the next backup will delete the oldest
backup.
Specify 0 to keep an unlimited number of backups.
|
$backup-security-db
:
Whether to backup the security database alongside the current
backup.
|
$backup-schemas-db
:
Whether to backup the schemas database alongside the current
backup.
|
$backup-triggers-db
:
Whether to backup the triggers database alongside the current
backup.
|
$include-replicas
(optional):
If set to false, do not include the replicas in
the backup. The default is true, which means to
include all replicas in the backup.
|
$journal-archiving
(optional):
Whether or not to enable journal archiving. Defaults to false.
|
$journal-archive-path
(optional):
Path for where archived journals are stored. Defaults to the backup data directory.
|
$lag-limit
(optional):
Maximum difference in seconds that the archived journal can lag behind its forest's active journal. Defaults to 900.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-hourly-backup("/backup-dir", 2,
30, 10, true(), true(), true())
(: Returns the hourly database backup specification. For example, if the current
time is 2:15pm, the backup will run at 4:30pm, 6:30pm, 8:30pm, and so on. :)
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-hourly-backup("/backup-dir", 2,
30, 10, true(), true(), true(),false(),true(),(),500)
(: Returns the hourly database backup specification. For example, if the current
time is 2:15pm, the backup will run at 4:30pm, 6:30pm, 8:30pm, and so on. :)
|
|
|
|
admin:database-included-element(
|
|
$namespace as xs:string?,
|
|
$localname as xs:string,
|
|
$weight as xs:double,
|
|
$attribute-namespace as xs:string?,
|
|
$attribute-localname as xs:string,
|
|
$attribute-value as xs:string
|
| ) as element(db:included-element) |
|
 |
Summary:
This function constructs an included element specification.
|
Parameters:
$namespace
:
The namespace URI. Specify an empty string if the
element is in no namespace.
|
$localname
:
The local name for the node.
|
$weight
:
The query weight to use in relavance calculations.
|
$attribute-namespace
:
The namespace for the attribute to constrain on. Specify an
empty string if there is no attribute to constrain on or if the
attribute is in no namespace.
|
$attribute-localname
:
The local name of the attribute to constrain on. Specify an
empty string if there is no attribute to constrain on.
|
$attribute-value
:
The value for the attribute to constrain on (only attributes with
this value). Specify an empty string if there is no attribute
to constrain on.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-included-element("http://myuri/namespace",
"element-name", 1.0, "", "myAttribute", "some value")
(: the constructed element :)
|
|
|
|
admin:database-minutely-backup(
|
|
$backup-dir as xs:string,
|
|
$backup-period as xs:positiveInteger,
|
|
$max-backups as xs:unsignedLong,
|
|
$backup-security-db as xs:boolean,
|
|
$backup-schemas-db as xs:boolean,
|
|
$backup-triggers-db as xs:boolean,
|
|
[$include-replicas as xs:boolean],
|
|
[$journal-archiving as xs:boolean?],
|
|
[$journal-archive-path as xs:string?],
|
|
[$lag-limit as xs:unsignedLong?]
|
| ) as element(db:database-backup) |
|
 |
Summary:
This function constructs a scheduled database backup on a number-of-minutes basis.
|
Parameters:
$backup-dir
:
The directory to save the backup.
|
$backup-period
:
The number of minutes to elapse between each backup.
|
$max-backups
:
The maximum number of backups to keep. When you reach the specified
maximum number of backups, the next backup will delete the oldest
backup.
Specify 0 to keep an unlimited number of backups.
|
$backup-security-db
:
Whether to backup the security database alongside the current
backup.
|
$backup-schemas-db
:
Whether to backup the schemas database alongside the current
backup.
|
$backup-triggers-db
:
Whether to backup the triggers database alongside the current
backup.
|
$include-replicas
(optional):
If set to false, do not include the replicas in
the backup. The default is true, which means to
include all replicas in the backup.
|
$journal-archiving
(optional):
Whether or not to enable journal archiving. Defaults to false.
|
$journal-archive-path
(optional):
Path for where archived journals are stored. Defaults to the backup data directory.
|
$lag-limit
(optional):
Maximum difference in seconds that the archived journal can lag behind its forest's active journal. Defaults to 900.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-minutely-backup("/backup-dir", 45,
10, true(), true(), true())
(: Returns the minutely database backup specification. :)
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-minutely-backup("/backup-dir", 45,
10, true(), true(), true(),false(),true(),(),500)
(: Returns the minutely database backup specification. :)
|
|
|
|
admin:database-monthly-backup(
|
|
$backup-dir as xs:string,
|
|
$backup-period as xs:positiveInteger,
|
|
$backup-month-day as xs:unsignedLong,
|
|
$start-time as xs:time,
|
|
$max-backups as xs:unsignedLong,
|
|
$backup-security-db as xs:boolean,
|
|
$backup-schemas-db as xs:boolean,
|
|
$backup-triggers-db as xs:boolean,
|
|
[$include-replicas as xs:boolean],
|
|
[$journal-archiving as xs:boolean?],
|
|
[$journal-archive-path as xs:string?],
|
|
[$lag-limit as xs:unsignedLong?]
|
| ) as element(db:database-backup) |
|
 |
Summary:
This function constructs a monthly scheduled backup.
|
Parameters:
$backup-dir
:
The directory where the backup will be saved to.
|
$backup-period
:
The number of months to elapse between each backup.
|
$backup-month-day
:
The day of the month the backup will happen (between 1 and 31)
|
$start-time
:
A time for the scheduled backup to start.
|
$max-backups
:
The maximum number of backups to keep in the backup
directory.
|
$backup-security-db
:
Whether to backup the security database alongside the
current backup.
|
$backup-schemas-db
:
Whether to backup the schemas database alongside the
current backup.
|
$backup-triggers-db
:
Whether to backup the triggers database alongside the
current backup.
|
$include-replicas
(optional):
If set to false, do not include the replicas in
the backup. The default is true, which means to
include all replicas in the backup.
|
$journal-archiving
(optional):
Whether or not to enable journal archiving. Defaults to false.
|
$journal-archive-path
(optional):
Path for where archived journals are stored. Defaults to the backup data directory.
|
$lag-limit
(optional):
Maximum difference in seconds that the archived journal can lag behind its forest's active journal. Defaults to 900.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-monthly-backup("/backup-dir", 2, 1,
xs:time("09:45:00"),10,true(),true(),true())
(: returns the monthly backup specification :)
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-monthly-backup("/backup-dir", 2, 1,
xs:time("09:45:00"),10,true(),true(),true(),false(),true(),(),500)
(: returns the monthly backup specification :)
|
|
|
|
admin:database-one-time-backup(
|
|
$backup-dir as xs:string,
|
|
$start as xs:dateTime,
|
|
$max-backups as xs:unsignedLong,
|
|
$backup-security-db as xs:boolean,
|
|
$backup-schemas-db as xs:boolean,
|
|
$backup-triggers-db as xs:boolean,
|
|
[$include-replicas as xs:boolean],
|
|
[$journal-archiving as xs:boolean?],
|
|
[$journal-archive-path as xs:string?],
|
|
[$lag-limit as xs:unsignedLong?]
|
| ) as element(db:database-backup) |
|
 |
Summary:
This function constructs a one-time backup.
|
Parameters:
$backup-dir
:
The directory where the backup will be saved to.
|
$start
:
The starting dateTime of the scheduled backup.
|
$max-backups
:
The maximum number of backups to keep in the backup
directory.
|
$backup-security-db
:
Whether to backup the security database alongside the
current backup.
|
$backup-schemas-db
:
Whether to backup the schemas database alongside the
current backup.
|
$backup-triggers-db
:
Whether to backup the triggers database alongside the
current backup.
|
$include-replicas
(optional):
If set to false, do not include the replicas in
the backup. The default is true, which means to
include all replicas in the backup.
|
$journal-archiving
(optional):
Whether or not to enable journal archiving. Defaults to false.
|
$journal-archive-path
(optional):
Path for where archived journals are stored. Defaults to the backup data directory.
|
$lag-limit
(optional):
Maximum difference in seconds that the archived journal can lag behind its forest's active journal. Defaults to 900.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-one-time-backup("/backup-dir",
xs:dateTime("2008-02-14T09:45:00"),10,true(),true(),true())
(: returns the one-time backup :)
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-one-time-backup("/backup-dir",
xs:dateTime("2008-02-14T09:45:00"),10,true(),true(),true(),false(),true(),(),500)
(: returns the one-time backup :)
|
|
|
|
admin:database-range-element-attribute-index(
|
|
$scalar-type as xs:string,
|
|
$parent-namespace as xs:string?,
|
|
$parent-localname as xs:string,
|
|
$namespace as xs:string?,
|
|
$localname as xs:string,
|
|
$collation as xs:string,
|
|
$range-value-positions as xs:boolean
|
| ) as element(db:range-element-attribute-index) |
|
 |
Summary:
This function constructs a range element attribute index
specification.
|
Parameters:
$scalar-type
:
A valid type for the range index. Must be one of:
int, unsignedInt,
long, unsignedLong,
float, double,
decimal, dateTime,
time, date,
gYearMonth, gYear,
gMonth, gDay,
yearMonthDuration, dayTimeDuration,
string, anyURI, or
point.
|
$parent-namespace
:
The namespace of the parent element for the attribute.
|
$parent-localname
:
The local name of the parent element for the attribute.
|
$namespace
:
The namespace URI.
|
$localname
:
The local name for the node.
|
$collation
:
The collation URI (for example,
http://marklogic.com/collation/. The collation
is only needed for string and anyURI indexes; for other indexes,
specify the empty string ("") for this parameter.
|
$range-value-positions
:
A boolean specifying whether to maintain value postions
in this index (used with co-occurrences).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-range-element-attribute-index("string", "/my/namespace",
"elementname", "", "myAtribute", "http://marklogic.com/collation/",
fn:false() )
(: returns the range element attribute-index specification :)
|
|
|
|
admin:database-range-element-index(
|
|
$scalar-type as xs:string,
|
|
$namespace as xs:string?,
|
|
$localname as xs:string,
|
|
$collation as xs:string,
|
|
$range-value-positions as xs:boolean
|
| ) as element(db:range-element-index) |
|
 |
Summary:
This function constructs a range element index
specification.
|
Parameters:
$scalar-type
:
A valid type for the range index. Must be one of:
int, unsignedInt,
long, unsignedLong,
float, double,
decimal, dateTime,
time, date,
gYearMonth, gYear,
gMonth, gDay,
yearMonthDuration, dayTimeDuration,
string, anyURI, or
point.
|
$namespace
:
The namespace URI.
|
$localname
:
The local name for the node.
|
$collation
:
The collation URI (for example,
http://marklogic.com/collation/). The collation
is only needed for string and anyURI indexes; for other indexes,
specify the empty string ("") for this parameter.
|
$range-value-positions
:
A boolean specifying whether to maintain value postions
in this index (used with co-occurrences).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-range-element-index("string", "/my/namespace",
"elementname", "http://marklogic.com/collation/",
fn:false() )
(: returns the range element index specification :)
|
|
|
|
admin:database-range-field-index(
|
|
$scalar-type as xs:string,
|
|
$fieldname as xs:string,
|
|
$collation as xs:string,
|
|
$range-value-positions as xs:boolean
|
| ) as element(db:range-field-index) |
|
 |
Summary:
This function constructs a range field index
specification.
|
Parameters:
$scalar-type
:
A valid type for the range index. Must be one of:
int, unsignedInt,
long, unsignedLong,
float, double,
decimal, dateTime,
time, date,
gYearMonth, gYear,
gMonth, gDay,
yearMonthDuration, dayTimeDuration,
string, anyURI, or
point.
|
$fieldname
:
The name for the field.
|
$collation
:
The collation URI (for example,
http://marklogic.com/collation/). The collation
is only needed for string and anyURI indexes; for other indexes,
specify the empty string ("") for this parameter.
|
$range-value-positions
:
A boolean specifying whether to maintain value postions
in this index (used with co-occurrences).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-range-field-index("string", "fieldname",
"http://marklogic.com/collation/",
fn:false() )
(: returns the range field index specification :)
|
|
|
|
admin:database-recurring-merge-blackout(
|
|
$limit as xs:unsignedInt,
|
|
$merge-priority as xs:string,
|
|
$days as xs:string+,
|
|
$start-time as xs:time?,
|
|
$end-time as xs:time?,
|
|
$duration as xs:duration?
|
| ) as element(db:merge-blackout) |
|
 |
Summary:
This function constructs a merge-blackout specification.
|
Parameters:
$limit
:
The maximum number of megabytes for a merge.
|
$merge-priority
:
The CPU scheduler priority for merges. Must be one of
normal or lower.
|
$days
:
The day(s) of the week. Must be a sequence of zero
or more of monday, tuesday,
wednesday, thusday,
friday, saturday,
sunday.
|
$start-time
:
A time for the merge blackout to start.
|
$end-time
:
A time for the merge blackout to end.
|
$duration
:
The amount of time for the blackout to last.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-recurring-merge-blackout(500, "lower", "monday",
xs:time("09:45:00"), xs:time("11:45:00"), () )
(: returns the merge-blackout specification :)
|
|
|
|
admin:database-set-field-fast-case-sensitive-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field fast case sensitive
searches setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-fast-case-sensitive-searches($config,
xdmp:database("myDatabase"), "myField", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-fast-diacritic-sensitive-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field fast diacritic sensitive
searches setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-fast-diacritic-sensitive-searches($config,
xdmp:database("myDatabase"), "myField", fn:false())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-fast-phrase-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field fast phrase searches setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-fast-phrase-searches($config,
xdmp:database("myDatabase"), "myField", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-include-document-root(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field include document root setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false() to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-include-document-root($config,
xdmp:database("myDatabase"), "myField", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-one-character-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field one character searches setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-one-character-searches($config,
xdmp:database("myDatabase"), "myField", fn:false())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-stemmed-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:string?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field stemmed searches setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
The new stemmed search value. Must be one of
basic, advanced,
decompounding, or off.
It must be equal to or greater than the database setting.
The empty sequence turns this setting off for the field.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-stemmed-searches($config,
xdmp:database("myDatabase"), "myField", "decompounding")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-three-character-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field three character searches
setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-three-character-searches($config,
xdmp:database("myDatabase"), "myField", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-three-character-word-positions(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field three character
word positions setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-three-character-word-positions($config,
xdmp:database("myDatabase"), "myField", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-trailing-wildcard-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field trailing wildcard
searches setting
for the specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-trailing-wildcard-searches($config,
xdmp:database("myDatabase"), "myField", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-trailing-wildcard-word-positions(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field trailing wildcard word
positions setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-wildcard-word-positions($config,
xdmp:database("myDatabase"), "myField", fn:false())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-two-character-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field two character searches setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-get-field-two-character-searches($config,
xdmp:database("myDatabase"), "myField", fn:false())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-value-positions(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field value positions setting
for the specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database to copy (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable,
fn:false() to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-value-positions($config,
xdmp:database("myDatabase"), "my-field", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-value-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field value searches setting
for the specified database in the
configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database to copy (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable,
fn:false() to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-value-searches($config,
xdmp:database("myDatabase"), "my-field", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-field-word-searches(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$field-name as xs:string,
|
|
$value as xs:boolean?
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the field word searches setting
for the specified field in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$field-name
:
The name of the field.
|
$value
:
A boolean value, fn:true() to enable, fn:false()
or the empty sequence to disable.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-field-word-searches($config,
xdmp:database("myDatabase"), "myField", fn:true())
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-format-compatibility(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the format cpmpatibility setting
for the specified database in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$value
:
The new format-compatibility setting. Must be one of:
automatic, 4.0,
3.2, 3.1, 3.0,
or 2.2.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-format-compatibility($config,
xdmp:database("myDatabase"), "automatic")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-journaling(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the journaling setting for the
specified database in the configuration. When set
to strict, the journal protects against
MarkLogic Server process failures, host operating
system kernel failures, and host hardware failures.
When set to fast, the journal protects
against MarkLogic Server process failures but not
against host operating system kernel failures or host
hardware failures. When set to off, the
journal does not protect against MarkLogic Server
process failures, host operating system kernel
failures, or host hardware failures.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$value
:
The new journaling value. Must be one of
strict, fast,
or off.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-journaling($config, xdmp:database("myDatabase"),
"strict")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-large-size-threshold(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$value as xs:unsignedInt
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the threshold at which binary documents
in the specified database should be handled as binary
large objects (BLOBs). Binary documents less than or
equal to the threshold are treated as small binary objects,
stored in stands. Binary documents larger than the
threshold are stored in the Large Data Directory for
more efficient memory consumption.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$value
:
The size in kilobytes beyond which binary documents are
treated as binary large objects (BLOBs) and stored in the
Large Data Directory. The default is 1 MB.
|
|
Usage Notes:
Binary documents with size less than or equal to the configured
threshold are treated as small binary objects and stored in stands.
The entire contents of a small binary document is cached in memory.
Binary documents larger than the threshold are stored in the Large
Data Directory for more efficient memory usage. For details about
small vs. large binaries, see "Binary Format" in the
Application Developer's Guide.
The threshold value is in kilobytes and must be in the range:
- 128 KB <= threshold <= 512 MB on 64-bit systems
- 128 KB <= threshold <= 128 MB on 32-bit systems
The location of the Large Data Directory may be configured during
forest creation by setting the "large data directory" property
on the Forest configuration page of the Admin Interface, or by
passing a large-data-directory parameter to
admin:forest-create.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-large-size-threshold($config, xdmp:database("myDatabase"),
2048)
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-locking(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the locking setting for the
specified database in the configuration. When set to
strict, locking enforces mutual exclusion
on existing documents and on new documents. When set
to fast, locking enforces mutual
exclusion on existing documents but not on new
documents. When set to off, locking does
not enforce mutual exclusion on existing documents or
on new documents.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$value
:
The new locking value. Must be one of
strict, fast,
or off.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:database-set-locking($config, xdmp:database("myDatabase"),
"fast")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:database-set-tf-normalization(
|
|
$config as element(configuration),
|
|
$database-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function specifies whether to use the default term-frequency
normalization (scaled-log), which scales the term frequency based on the size of
the document, or to use the unscaled-log, which uses term frequency as a function
of the actual term frequency in a document, regardless of the document size.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
$value
:
The new term-frequency normalization setting. Must be one of:
scaled-log or unscaled-log.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $db := admin:database-get-id($config, "myDatabase")
return <apidoc:param name="config" type="element(configuration)">
A configuration specification, typically as returned
from one of the Admin module functions.
</apidoc:param>
<apidoc:param name="group-id" type="xs:unsignedLong">
The name of the group.
</apidoc:param>
admin:database-set-tf-normalization($config, $db, "unscaled-log")
(: Sets the term-frequency normalization setting to "unscaled-log" for the
database, "myDatabase." :)
|
|
|
|
admin:database-weekly-backup(
|
|
$backup-dir as xs:string,
|
|
$backup-period as xs:positiveInteger,
|
|
$days as xs:string+,
|
|
$start-time as xs:time,
|
|
$max-backups as xs:unsignedLong,
|
|
$backup-security-db as xs:boolean,
|
|
$backup-schemas-db as xs:boolean,
|
|
$backup-triggers-db as xs:boolean,
|
|
[$include-replicas as xs:boolean],
|
|
[$journal-archiving as xs:boolean],
|
|
[$journal-archive-path as xs:string],
|
|
[$lag-limit as xs:unsignedLong]
|
| ) as element(db:database-backup) |
|
 |
Summary:
This function constructs a weekly scheduled backup.
|
Parameters:
$backup-dir
:
The directory where the backup will be saved to.
|
$backup-period
:
The how many weeks between each backup.
|
$days
:
The day(s) of the week. Must be a sequence of zero
or more of monday, tuesday,
wednesday, thusday,
friday, saturday,
sunday.
|
$start-time
:
A time for the scheduled backup to start.
|
$max-backups
:
The maximum number of backups to keep in the backup
directory.
|
$backup-security-db
:
Whether to backup the security database alongside the
current backup.
|
$backup-schemas-db
:
Whether to backup the schemas database alongside the
current backup.
|
$backup-triggers-db
:
Whether to backup the triggers database alongside the
current backup.
|
$include-replicas
(optional):
If set to false, do not include the replicas in
the backup. The default is true, which means to
include all replicas in the backup.
|
$journal-archiving
(optional):
Whether or not to enable journal archiving. Defaults to false.
|
$journal-archive-path
(optional):
Path for where archived journals are stored. Defaults to the backup data directory.
|
$lag-limit
(optional):
Maximum difference in seconds that the archived journal can lag behind its forest's active journal. Defaults to 900.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-weekly-backup("/backup-dir", 2, "monday",
xs:time("09:45:00"),10,true(),true(),true())
(: returns the weekly backup specification :)
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:database-weekly-backup("/backup-dir", 2, "monday",
xs:time("09:45:00"),10,true(),true(),true(),false(),true(),(),500)
(: returns the weekly backup specification :)
|
|
|
|
admin:foreign-cluster-create(
|
|
$config as element(configuration),
|
|
$cluster-id as xs:unsignedLong,
|
|
$cluster-name as xs:string,
|
|
$xdqp-timeout as xs:unsignedInt?,
|
|
$host-timeout as xs:unsignedInt?,
|
|
$ssl-certificate as xs:string?,
|
|
$xdqp-ssl-enabled as xs:boolean?,
|
|
$xdqp-ssl-allow-sslv3 as xs:boolean?,
|
|
$xdqp-ssl-allow-tls as xs:boolean?,
|
|
$xdqp-ssl-ciphers as xs:string?,
|
|
$foreign-bootstrap-hosts as element(cl:foreign-host)*
|
| ) as element(configuration) |
|
 |
Summary:
This function creates a complete configuration for a foreign cluster.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$cluster-id
:
The id of the foreign cluster, obtained by running the admin:cluster-get-id
function on the foreign cluster.
|
$cluster-name
:
The name of the foreign cluster.
|
$xdqp-timeout
:
The XDQP timeout setting (in seconds) for the foreign cluster.
|
$host-timeout
:
the host timeout setting (in seconds) for the foreign cluster.
|
$ssl-certificate
:
The SSL certificate returned by the admin:cluster-get-xdqp-ssl-certificate
function on the foreign cluster.
|
$xdqp-ssl-enabled
:
Specify fn:true() to enable SSL for the foreign cluster or
fn:false() to disable SSL.
|
$xdqp-ssl-allow-sslv3
:
Specify fn:true() to enable the SSL v3 protocol for
the foreign cluster or fn:false() to disable the SSL
v3 protocol.
|
$xdqp-ssl-allow-tls
:
Specify fn:true() to enable the TLS protocol for the
foreign cluster or fn:false() to disable the TLS protocol.
|
$xdqp-ssl-ciphers
:
The SSL ciphers to set. This can be any standard cipher specification
string for OpenSSL.
|
$foreign-bootstrap-hosts
:
The boot strap host configuration returned from the admin:foreign-host
function. You can specify multiple bootstrap hosts on a cluster.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $cfg := admin:get-configuration()
(: Obtain foreign cluster id by running admin:cluster-get-id on the foreign cluster. :)
let $fcl := 15499567556358534770
let $cert := "----BEGIN CERTIFICATE-----
MIICzjCCAbagAwIBAgIJAMieG0IJQAWQMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV
BAMTFDE3MDY0ODkwODY2NTc0NzgxNTcxMB4XDTExMDYwMjIwMjA1M1oXDTIxMDUz
MDIwMjA1M1owHzEdMBsGA1UEAxMUMTcwNjQ4OTA4NjY1NzQ3ODE1NzEwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPM9XLSbmVN1Fykz523I7H9Cq4zgO9
cUSHI/FArYnWNXUbJIesvDifu2DggfsE7HD6Glwa1ZvkVTBDyZhYv1MZMpBy18Au
9McoBbl9NYHOIhtM6bHTJAWNDoHi+TL/rFJzxo5h+bC/JnOjbE40MZKkzSzV944t
LbpYT3JfGtMJgcCEWqVLp7vkSRUsKCPuJdPpFfMixDaLA75+W9PVdm01jDvihrgr
CZkVjlMzZersHYQDsuNNWwt/9fM1skKabVWUVB0vHV307j2JHwVUJS3+hVxSiT61
GaIO3GSL6dVI5ZlYZCCyyFNc0cqPutu0Q3MfZq6MpFlt5Iffm0cWwSkvAgMBAAGj
DTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAIKRSFrk3a7JBl9bBsBb
sWxob3eVM4wh8f6EPjdiIZL0V7HH4dH2hdcvtXB0NdMntiTeJfjm/tdzzMMS0al/
LZV3BxxMa7vYk6JtRFUaMdMwwsSa319n2WXKHlqZksWk4H5gC8AH5Vpdex44SKP4
GYVh0MO5kIS07yHfuv66PWsTRQiIHQSHYe33Dot/Mfs9BT/sVm1qRJ1ZO5GAf136
3iQhwf8fa0PdYGfmN9I1yQMneet3W3k9T4J86mp4RuYl44Z0sv1p3oDCcuiVRgbF
ro0dL8n7gE6fW8Hj5tnZQxYzFCwUqy8nhab+MwpOsoACOM8WvULnaMgPdflEklQT
VL0=
-----END CERTIFICATE-----"
let $host := admin:foreign-host(13134636216063499728, "master.marklogic.com", 7998)
return admin:foreign-cluster-create($cfg, $fcl, "master", 15, 35, $cert, fn:true(),
fn:false(), fn:false(), "All", $host)
(: Creates a complete configuration for the foreign cluster. Use
admin:save-configuration to save the changes to the configuration or
pass the configuration to other Admin API functions to make other changes. :)
|
|
|
|
admin:foreign-cluster-replace(
|
|
$config as element(configuration),
|
|
$cluster-id as xs:unsignedLong,
|
|
$cluster-name as xs:string,
|
|
$xdqp-timeout as xs:unsignedInt?,
|
|
$host-timeout as xs:unsignedInt?,
|
|
$ssl-certificate as xs:string?,
|
|
$xdqp-ssl-enabled as xs:boolean?,
|
|
$xdqp-ssl-allow-sslv3 as xs:boolean?,
|
|
$xdqp-ssl-allow-tls as xs:boolean?,
|
|
$xdqp-ssl-ciphers as xs:string?,
|
|
$foreign-bootstrap-hosts as element(cl:foreign-host)*
|
| ) as element(configuration) |
|
 |
Summary:
This function replaces a configuration for a foreign cluster with a new configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$cluster-id
:
The id of the foreign cluster.
|
$cluster-name
:
The name of the foreign cluster.
|
$xdqp-timeout
:
The XDQP timeout setting (in seconds) for the foreign cluster.
|
$host-timeout
:
the host timeout setting (in seconds) for the foreign cluster.
|
$ssl-certificate
:
The SSL certificate returned by the admin:cluster-get-xdqp-ssl-certificate
function on the foreign cluster.
|
$xdqp-ssl-enabled
:
Specify fn:true() to enable SSL for the foreign cluster or
fn:false() to disable SSL.
|
$xdqp-ssl-allow-sslv3
:
Specify fn:true() to enable the SSL v3 protocol for
the foreign cluster or fn:false() to disable the SSL
v3 protocol.
|
$xdqp-ssl-allow-tls
:
Specify fn:true() to enable the TLS protocol for the
foreign cluster or fn:false() to disable the TLS protocol.
|
$xdqp-ssl-ciphers
:
The SSL ciphers to set. This can be any standard cipher specification
string for OpenSSL.
|
$foreign-bootstrap-hosts
:
The boot strap host configuration returned from the admin:foreign-host
function. You can specify multiple bootstrap hosts on a cluster.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $cfg := admin:get-configuration()
let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
let $cert := "----BEGIN CERTIFICATE-----
MIICzjCCAbagAwIBAgIJAMieG0IJQAWQMA0GCSqGSIb3DQEBBQUAMB8xHTAbBgNV
BAMTFDE3MDY0ODkwODY2NTc0NzgxNTcxMB4XDTExMDYwMjIwMjA1M1oXDTIxMDUz
MDIwMjA1M1owHzEdMBsGA1UEAxMUMTcwNjQ4OTA4NjY1NzQ3ODE1NzEwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPM9XLSbmVN1Fykz523I7H9Cq4zgO9
cUSHI/FArYnWNXUbJIesvDifu2DggfsE7HD6Glwa1ZvkVTBDyZhYv1MZMpBy18Au
9McoBbl9NYHOIhtM6bHTJAWNDoHi+TL/rFJzxo5h+bC/JnOjbE40MZKkzSzV944t
LbpYT3JfGtMJgcCEWqVLp7vkSRUsKCPuJdPpFfMixDaLA75+W9PVdm01jDvihrgr
CZkVjlMzZersHYQDsuNNWwt/9fM1skKabVWUVB0vHV307j2JHwVUJS3+hVxSiT61
GaIO3GSL6dVI5ZlYZCCyyFNc0cqPutu0Q3MfZq6MpFlt5Iffm0cWwSkvAgMBAAGj
DTALMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAIKRSFrk3a7JBl9bBsBb
sWxob3eVM4wh8f6EPjdiIZL0V7HH4dH2hdcvtXB0NdMntiTeJfjm/tdzzMMS0al/
LZV3BxxMa7vYk6JtRFUaMdMwwsSa319n2WXKHlqZksWk4H5gC8AH5Vpdex44SKP4
GYVh0MO5kIS07yHfuv66PWsTRQiIHQSHYe33Dot/Mfs9BT/sVm1qRJ1ZO5GAf136
3iQhwf8fa0PdYGfmN9I1yQMneet3W3k9T4J86mp4RuYl44Z0sv1p3oDCcuiVRgbF
ro0dL8n7gE6fW8Hj5tnZQxYzFCwUqy8nhab+MwpOsoACOM8WvULnaMgPdflEklQT
VL0=
-----END CERTIFICATE-----"
let $host := admin:foreign-host(13134636216063499728, "master.marklogic.com", 7998)
return admin:foreign-cluster-replace($cfg, $fcl, "master", 15, 35, $cert, fn:true(),
fn:false(), fn:false(), "All", $host)
(: Replaces an existing configuration for the foreign cluster. Use
admin:save-configuration to save the changes to the configuration
or pass the configuration to other Admin API functions to make other changes. :)
|
|
|
|
admin:foreign-cluster-set-bootstrap-hosts(
|
|
$config as element(configuration),
|
|
$cluster-id as xs:unsignedLong,
|
|
$bootstrap-hosts as element(cl:foreign-host)*
|
| ) as element(configuration) |
|
 |
Summary:
This function identifies the foreign host to be used to bootstrap communication with the
foreign cluster.
When a bootstrap host on a foreign cluster initially starts, it will bootstrap communications
by establishing a connection to one or more of the hosts on this cluster. Once a
connection has been established between cluster hosts, the bootstrap host retrieves
configuration information to identify which foreign
hosts are responsible for specific foreign forests.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$cluster-id
:
The id of the foreign cluster.
|
$bootstrap-hosts
:
The boot strap host configuration returned from the admin:foreign-host
function. You can specify multiple bootstrap hosts on a cluster.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $cfg := admin:get-configuration()
let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
let $host := admin:foreign-host(13134636216063499728,
"master.marklogic.com",
7998)
return admin:foreign-cluster-set-bootstrap-hosts($cfg, $fcl, $host)
(: Sets 'master.marklogic.com' as the bootstrap host for the foreign cluster. Use
admin:save-configuration to save the changes to the configuration or pass the
configuration to other Admin API functions to make other changes. :)
|
|
|
|
admin:forest-add-foreign-replicas(
|
|
$config as element(configuration),
|
|
$forest-id as xs:unsignedLong,
|
|
$foreign-replicas as element(as:foreign-replica)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds the replica forest that is associated with the specified master
forest to the database replication configuration. This function must be executed
on the master host.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$forest-id
:
The id of the forest on the master host to be replicated.
|
$foreign-replicas
:
The element returned by the admin:forest-foreign-replica
function that specifies the configuration for the replica forest. More
than one forest replica configuration elements may be specified in a one-to-many
replication scheme.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $cfg := admin:get-configuration()
let $fcl := admin:cluster-get-foreign-cluster-id($cfg, "ClusterA")
let $fdb := admin:database-foreign-replica-get-database-id(
admin:database-get-foreign-replicas($cfg, xdmp:database("Documents")))
let $mforest := xdmp:forest("Documents2")
let $fforest := admin:forest-foreign-replica($fcl, $fdb , 2863600501631949400)
return admin:forest-add-foreign-replicas($cfg, $mforest, $fforest)
(: Adds the foreign forest, 'Document2', to the forests used by the replica database,
'Documents'. Use admin:save-configuration to save the changes to the configuration
or pass the configuration to other Admin API functions to make other changes. :):)
|
|
|
|
admin:forest-copy(
|
|
$config as element(configuration),
|
|
$forest-id as xs:unsignedLong,
|
|
$forest-name as xs:string,
|
|
$data-directory as xs:string?,
|
|
[$large-data-directory as xs:string?],
|
|
[$fast-data-directory as xs:string?]
|
| ) as element(configuration) |
|
 |
Summary:
This function creates a new forest specification with the
same settings as the forest with the specified ID. The new
forest configuration will have the specified name. It
copies the forest configuration, but does not copy
the forest data.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$forest-id
:
The ID of the forest. For example,
xdmp:forest("myForest") specified the ID
for a forest named "myForest".
|
$forest-name
:
The name for the new forest.
|
$data-directory
:
The optional data directory of the forest. If no directory
is specified, then it will be a private forest.
|
$large-data-directory
(optional):
The optional directory where large objects are stored. If no directory
is specified, then large objects will be stored in
DATA_DIR/Forests/FOREST_NAME/Large.
|
$fast-data-directory
(optional):
An optional directory located on a fast storage device, such as an SSD.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:forest-copy(admin:get-configuration(), xdmp:forest("myForest"),
"myNewForest",())
|
|
|
|
admin:forest-create(
|
|
$config as element(configuration),
|
|
$forest-name as xs:string,
|
|
$host-id as xs:unsignedLong,
|
|
$data-directory as xs:string?,
|
|
[$large-data-directory as xs:string?]
|
| ) as element(configuration) |
|
 |
Summary:
This function creates a new forest configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$forest-name
:
The name of the forest. The must be unique for all
forests in the cluster.
|
$host-id
:
The ID of the host (for example, xdmp:host()
for the current host.
|
$data-directory
:
The optional data directory of the forest. If no directory
is specified, then it will be a private forest.
|
$large-data-directory
(optional):
The optional directory where large objects are stored. If no directory
is specified, then large objects will be stored in
DATA_DIR/Forests/FOREST_NAME/Large.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:forest-create(admin:get-configuration(), "newForest", xdmp:host(), ())
|
|
|
|
admin:forest-delete(
|
|
$config as element(configuration),
|
|
$forest-ids as xs:unsignedLong*,
|
|
$delete-data as xs:boolean
|
| ) as element(configuration) |
|
 |
Summary:
This function deletes the configuration for the specified
forest from the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$forest-ids
:
One or more forest ids. For example,
xdmp:forest("myForest") specified the ID
for a forest named "myForest".
|
$delete-data
:
If set to true, deletes the data directory as well as the
configuration (Note: all documents in the forest will be
permanently deleted). If set to false, deletes only the
configuration information, leaving the forest data in the
data directory on disk.
|
|
Usage Notes:
Any forest whose ID you pass into this function must not be attached
to a database when the transaction begins, otherwise an exception is
thrown. If you need to detach the forest, do so in a separate transaction
before using them in this function.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:forest-delete($config, admin:forest-get-id($config, "Documents"),
fn:false())
=> deletes the forest configuration for the forest
named "Documents"
|
|
|
|
admin:forest-set-updates-allowed(
|
|
$config as element(configuration),
|
|
$forest-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function sets the updates-allowed state for a
forest configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$forest-id
:
The ID of the forest. For example,
xdmp:forest("myForest") specified the ID
for a forest named "myForest".
|
$value
:
The new updates-allowed state of the forest. Must be one of
all for all updates allowed,
delete-only for only deletes allowed,
read-only for no updates allowed and to cause
updating transactions to abort immediately,
flash-backup for no updates allowed and to make
updating transactions retry for a time period specified in
the group's retry timeout.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:forest-set-updates-allowed($config,
admin:forest-get-id($config, "Documents"),
"delete-only")
=> sets the updates-allowed state of the forest named "Documents" to
the true state
|
|
|
|
admin:forest-weekly-backup(
|
|
$backup-dir as xs:string,
|
|
$backup-period as xs:positiveInteger,
|
|
$days as xs:string+,
|
|
$start-time as xs:time
|
| ) as element(as:forest-backup) |
|
 |
Summary:
This function constructs a weekly scheduled backup.
|
Parameters:
$backup-dir
:
The directory where the backup will be saved to.
|
$backup-period
:
The how many weeks between each backup.
|
$days
:
The day(s) of the week. Must be a sequence of zero
or more of monday, tuesday,
wednesday, thusday,
friday, saturday,
sunday.
|
$start-time
:
A time for the scheduled backup to start.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
admin:forest-weekly-backup("/backup-dir", 2, "monday", xs:time("09:45:00"))
(: returns the weekly backup specification :)
|
|
|
|
admin:group-add-scheduled-task(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$scheduled-tasks as element(gr:scheduled-task)*
|
| ) as element(configuration) |
|
 |
Summary:
This function adds one or more scheduled tasks to the specified group.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group on which the scheduled tasks are configured.
Typically, this is the result of an
admin:group-get-id call.
|
$scheduled-tasks
:
One or more scheduled tasks, such as those created by the task-create
functions.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $task := admin:group-hourly-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
30,
xdmp:database("Documents"),
0,
xdmp:user("Jim"),
0)
let $addTask := admin:group-add-scheduled-task($config,
admin:group-get-id($config, "Default"), $task)
return
admin:save-configuration($addTask)
(: Creates an hourly scheduled task and adds it to the "Default" group. :)
|
|
|
|
admin:group-daily-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-period as xs:positiveInteger,
|
|
$task-start-time as xs:time,
|
|
$task-database as xs:unsignedLong,
|
|
$task-modules as xs:unsignedLong,
|
|
$task-user as xs:unsignedLong,
|
|
$task-host as xs:unsignedLong?,
|
|
[$task-priority as xs:string?]
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at daily intervals.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (files system) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of days to elapse
between each invocation of the module.
|
$task-start-time
:
The time of day (in 24:00 notation) to
invoke the module.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
$task-priority
(optional):
The priority of the task.
Either "normal" or "higher".
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:group-daily-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
xs:time("09:30:00"),
xdmp:database("Documents"),
xdmp:database("Modules"),
xdmp:user("Jim"),
0,
"normal")
(: returns a daily scheduled task. :)
|
|
|
|
admin:group-hourly-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-period as xs:positiveInteger,
|
|
$task-minute as xs:nonNegativeInteger,
|
|
$task-database as xs:unsignedLong,
|
|
$task-modules as xs:unsignedLong,
|
|
$task-user as xs:unsignedLong,
|
|
$task-host as xs:unsignedLong?,
|
|
[$task-priority as xs:string?]
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at hourly intervals.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (filesystem) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of hours to elapse
between each invocation of the module.
|
$task-minute
:
The number of minutes after the hour to invoke the module. This value must be 59 or less.
Note that this setting does not add to the task-period value.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
$task-priority
(optional):
The priority of the task.
Either "normal" or "higher".
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:group-hourly-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
30,
xdmp:database("Documents"),
0,
xdmp:user("Jim"),
0,
"normal")
(: returns an hourly scheduled task. :)
|
|
|
|
admin:group-minutely-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-period as xs:positiveInteger,
|
|
$task-database as xs:unsignedLong,
|
|
$task-modules as xs:unsignedLong,
|
|
$task-user as xs:unsignedLong,
|
|
$task-host as xs:unsignedLong?,
|
|
[$task-priority as xs:string?]
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at intervals defined in terms of minutes.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (filesystem) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of minutes to elapse
between each invocation of the module.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
$task-priority
(optional):
The priority of the task.
Either "normal" or "higher".
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:group-minutely-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
45,
xdmp:database("Documents"),
0,
xdmp:user("Jim"),
0,
"normal")
(: returns a minutely scheduled task. :)
|
|
|
|
admin:group-monthly-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-period as xs:positiveInteger,
|
|
$task-month-day as xs:unsignedLong,
|
|
$task-start-time as xs:time,
|
|
$task-database as xs:unsignedLong,
|
|
$task-modules as xs:unsignedLong,
|
|
$task-user as xs:unsignedLong,
|
|
$task-host as xs:unsignedLong?,
|
|
[$task-priority as xs:string?]
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at monthly intervals.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (files system) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of months to elapse
between each invocation of the module.
|
$task-month-day
:
The day of the month to invoke the module.
|
$task-start-time
:
The time of day (in 24:00 notation) to
invoke the module.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
$task-priority
(optional):
The priority of the task.
Either "normal" or "higher".
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:group-monthly-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
3,
xs:time("14:42:52"),
xdmp:database("Documents"),
0,
xdmp:user("Jim"),
0,
"normal")
(: returns a monthly scheduled task. :)
|
|
|
|
admin:group-one-time-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-start as xs:dateTime,
|
|
$task-database as xs:unsignedLong,
|
|
$task-modules as xs:unsignedLong,
|
|
$task-user as xs:unsignedLong,
|
|
$task-host as xs:unsignedLong?,
|
|
[$task-priority as xs:string?]
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked once, at a specific calendar day and time.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (files system) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-start
:
The date and time on which the task is to start.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
$task-priority
(optional):
The priority of the task.
Either "normal" or "higher".
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:group-one-time-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
xs:dateTime("2009-03-29T14:42:52"),
xdmp:database("Documents"),
xdmp:database("Documents"),
xdmp:user("Jim"),
admin:host-get-id($config, xdmp:host-name()),
"normal")
(: returns a one-time scheduled task. :)
|
|
|
|
admin:group-set-audit-role-restriction(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$restriction-type as xs:string,
|
|
$roles as xs:string*
|
| ) as element(configuration) |
|
 |
Summary:
This function restricts the audit configuration by excluding or
including by role.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group.
Typically, this is the result
of an admin:group-get-id call.
|
$restriction-type
:
The restriction type
(must be one of: "inclusion" or "exclusion").
|
$roles
:
The sequence of roles affected by the restriction type.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:group-set-audit-role-restriction($config, $groupid,
"exclusion",("admin-role","developer-role"))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:group-set-audit-uri-restriction(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$restriction-type as xs:string,
|
|
$uris as xs:string*
|
| ) as element(configuration) |
|
 |
Summary:
This function restricts the audit configuration by excluding or
including by document uri(s).
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group.
Typically, this is the result
of an admin:group-get-id call.
|
$restriction-type
:
The restriction type
(must be one of: "inclusion" or "exclusion").
|
$uris
:
The sequence of document-uris affected by the restriction type.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:group-set-audit-uri-restriction($config, $groupid,
"inclusion",("/important/foo.xml","/important/foo1.xml"))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:group-set-audit-user-restriction(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$restriction-type as xs:string,
|
|
$users as xs:string*
|
| ) as element(configuration) |
|
 |
Summary:
This function restricts the audit configuration by excluding or
including by user.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group.
Typically, this is the result
of an admin:group-get-id call.
|
$restriction-type
:
The restriction type
(must be one of: "inclusion" or "exclusion").
|
$users
:
The sequence of users affected by the restriction type.
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:group-set-audit-user-restriction($config, $groupid,
"exclusion",("admin1","admin2"))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:group-set-file-log-level(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function changes the host file log level setting
for the group in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group.
Typically, this is the result
of an admin:group-get-id call.
|
$value
:
The new log level (must be one of finest,
finer, fine,
debug, config,
info, notice,
warning, error,
critical,
alert, emergency).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:group-set-file-log-level($config, $groupid, "debug")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:group-set-rotate-audit-files(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function changes the rotate audit files setting
for the group in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group.
Typically, this is the result
of an admin:group-get-id call.
|
$value
:
The new audit level (must be one of never,
daily, monday,
tuesday, wednesday,
thursday, friday,
saturday, sunday,
monthly).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:group-set-rotate-audit-files($config, $groupid, "wednesday")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:group-set-rotate-log-files(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function changes the rotate log files setting
for the group in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group.
Typically, this is the result
of an admin:group-get-id call.
|
$value
:
The new log level (must be one of never,
daily, monday,
tuesday, wednesday,
thursday, friday,
saturday, sunday,
monthly).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:group-set-rotate-log-files($config, $groupid, "wednesday")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:group-set-system-log-level(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$value as xs:string
|
| ) as element(configuration) |
|
 |
Summary:
This function changes the host system log level setting
for the group in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group.
Typically, this is the result
of an admin:group-get-id call.
|
$value
:
The new log level (must be one of finest,
finer, fine,
debug, config,
info, notice,
warning, error,
critical,
alert, emergency).
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "Default")
return
admin:group-set-system-log-level($config, $groupid, "debug")
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:group-weekly-scheduled-task(
|
|
$task-path as xs:string,
|
|
$task-root as xs:string,
|
|
$task-period as xs:positiveInteger,
|
|
$task-days as xs:string+,
|
|
$task-start-time as xs:time,
|
|
$task-database as xs:unsignedLong,
|
|
$task-modules as xs:unsignedLong,
|
|
$task-user as xs:unsignedLong,
|
|
$task-host as xs:unsignedLong?,
|
|
[$task-priority as xs:string?]
|
| ) as element(gr:scheduled-task) |
|
 |
Summary:
This function constructs a task to be invoked at weekly intervals.
|
Parameters:
$task-path
:
The name of the module to be invoked. The task path must begin with a forward
slash (/) and cannot contain a question mark '?', colon ':' or pound '#' character.
|
$task-root
:
The root directory (files system) or URI root (database) that contains the module. For
example, if the module is located in the filesystem under MarkLogic/Docs, specify Docs.
|
$task-period
:
The number of weeks to elapse
between each invocation of the module.
|
$task-days
:
One or more days on the specified week to
invoke the module
|
$task-start-time
:
The time of day (in 24:00 notation) to
invoke the module.
|
$task-database
:
The id of the database on which the module
is to be invoked.
|
$task-modules
:
The id of the modules database.
For example, xdmp:database("Modules"). To specify the filesystem, use 0.
|
$task-user
:
The id of the user with permission to
invoke the module. For example, xdmp:user("Jim").
|
$task-host
:
The id of the host on which to
invoke the module. Leave empty, (), to specify all hosts.
|
$task-priority
(optional):
The priority of the task.
Either "normal" or "higher".
|
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
return
admin:group-weekly-scheduled-task(
"/Scheduler_test.xqy",
"/Docs",
2,
("Monday", "Wednesday"),
xs:time("14:42:52"),
xdmp:database("Documents"),
xdmp:database("Documents"),
xdmp:user("Jim"),
admin:host-get-id($config, xdmp:host-name()),
"normal")
(: returns a weekly scheduled task. :)
|
|
|
|
admin:host-set-group(
|
|
$config as element(configuration),
|
|
$host-id as xs:unsignedLong,
|
|
$value as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function changes the group to which an existing host
belongs to the newly specified value.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$host-id
:
The host ID. Typically, the result of an
admin:host-get-id call.
|
$value
:
The new group ID value (typically from a
admin:group-get-id call.
|
|
Usage Notes:
Any group whose ID you pass into this function must exist when the
transaction begins, otherwise an exception is thrown. If you
need to create the group, do so in a separate transaction before
using them in in this function.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $hostid := admin:host-get-id($config, xdmp:host-name())
return
admin:host-set-group($config, $hostid,
admin:group-get-id($config, "Default"))
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:http-server-create(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$appserver-name as xs:string,
|
|
$root as xs:string,
|
|
$port as xs:unsignedLong,
|
|
$modules-id as item(),
|
|
$database-id as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function creates a new HTTP App Server with the
specified name, root, and port in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group to which the App Server belongs.
Typically, this is the result
of an admin:group-get-id call.
|
$appserver-name
:
The name of the App Server. The name must be unique
among the App Server names for the group.
|
$root
:
The root of the App Server.
|
$port
:
The port on which the App Server listens. The port must
be available on the host.
|
$modules-id
:
The id of the modules database (for example,
xdmp:database("Modules")).
To specify the filesystem, use 0 or "file-system"
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
|
Usage Notes:
Any group or database whose ID you pass into this function must
exist when the transaction begins, otherwise an exception is thrown.
If you need to create the group and/or database,
do so in a separate transaction before using them in in this
function.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "myGroup")
return
admin:http-server-create($config, $groupid, "myNewAppServer",
"/space/mycode", 8005, 0, xdmp:database("myDatabase") )
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:webdav-server-create(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$appserver-name as xs:string,
|
|
$root as xs:string,
|
|
$port as xs:unsignedLong,
|
|
$database-id as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function creates a new WebDAV App Server with the
specified name, library, and port in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group to which the App Server belongs.
Typically, this is the result
of an admin:group-get-id call.
|
$appserver-name
:
The name of the App Server. The name must be unique
among the App Server names for the group.
|
$root
:
The root of the App Server.
|
$port
:
The port on which the App Server listens. The port must
be available on the host.
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
|
Usage Notes:
Any group or database whose ID you pass into this function must
exist when the transaction begins, otherwise an exception is thrown.
If you need to create the group and/or database,
do so in a separate transaction before using them in in this
function.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "myGroup")
return
admin:webdav-server-create($config, $groupid, "myNewAppServer",
"/space/mycode", 8005, xdmp:database("myDatabase") )
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|
|
admin:xdbc-server-create(
|
|
$config as element(configuration),
|
|
$group-id as xs:unsignedLong,
|
|
$appserver-name as xs:string,
|
|
$root as xs:string,
|
|
$port as xs:unsignedLong,
|
|
$modules-id as item(),
|
|
$database-id as xs:unsignedLong
|
| ) as element(configuration) |
|
 |
Summary:
This function creates a new XDBC App Server with the
specified name, root, and port in the configuration.
|
Parameters:
$config
:
A configuration specification, typically as returned
from one of the Admin module functions.
|
$group-id
:
The ID of the group to which the App Server belongs.
Typically, this is the result
of an admin:group-get-id call.
|
$appserver-name
:
The name of the App Server. The name must be unique
among the App Server names for the group.
|
$root
:
The path to the module directory root of this XDBC server.
|
$port
:
The port on which the App Server listens. The port must
be available on the host.
|
$modules-id
:
The id of the modules database (for example,
xdmp:database("Modules")).
To specify the filesystem, use 0 or "file-system"
|
$database-id
:
The id of the database (for example,
xdmp:database("myDatabase")).
|
|
Usage Notes:
Any group or database whose ID you pass into this function must
exist when the transaction begins, otherwise an exception is thrown.
If you need to create the group and/or database,
do so in a separate transaction before using them in in this
function.
|
Example:
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $groupid := admin:group-get-id($config, "myGroup")
return
admin:xdbc-server-create($config, $groupid, "myNewAppServer",
"/space/mycode", 8005, 0, xdmp:database("myDatabase") )
(: returns the new configuration element -- use admin:save-configuration
to save the changes to the configuration or pass the configuration
to other Admin API functions to make other changes. :)
|
|
|