<apidoc:module name="AdminModule" category="Admin Library" lib="admin" 
	bucket="XQuery Library Modules"
	xmlns:apidoc="http://marklogic.com/xdmp/apidoc" 
	xmlns="http://www.w3.org/1999/xhtml">
	<apidoc:summary>
<p>The Admin module is an XQuery library module that allows 
you to script administrative tasks that you otherwise would 
need the Admin Interface to perform.  Most functions in this library 
perform adminstrative tasks and therefore require the user who runs the 
XQuery program to have the Admin role.</p>
<p>Many of these functions provide new configuration information.  In most
cases, you must save the configuration (with 
<code>admin:save-configuration</code>, for example) in the same 
statement that you use the functions in order for them to take
effect.</p>
<p>To use the Admin module as part of your own XQuery module, 
include the following line in your XQuery prolog: </p>
<p><code>import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy" ;
</code></p>
<p>The library namespace prefix <code>admin</code> is <em>not</em> 
	predefined in the server.</p>
	</apidoc:summary>

  <apidoc:function name="get-database-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function returns all the database IDs from the configuration.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="config" type="element(configuration)">
        A configuration specification, typically as returned 
        from one of the Admin module functions.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:get-database-ids($config)
  (: returns the IDs of all the databases :)
  ]]></pre></apidoc:example>
  </apidoc:function>
	
  <apidoc:function name="get-host-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
    <apidoc:summary>
      This function returns all the host IDs from the configuration.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="config" type="element(configuration)">
        A configuration specification, typically as returned 
        from one of the Admin module functions.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:get-host-ids($config)
  (: returns the IDs of all the hosts :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="get-group-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns all the group IDs from the configuration.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="config" type="element(configuration)">
        A configuration specification, typically as returned 
        from one of the Admin module functions.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:get-group-ids($config)
  (: returns the IDs of all the groups :)
  ]]></pre></apidoc:example>
  </apidoc:function>

  <apidoc:function name="get-forest-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function returns all the forest IDs from the configuration.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="config" type="element(configuration)">
        A configuration specification, typically as returned 
        from one of the Admin module functions.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:get-forest-ids($config)
  (: returns the IDs of all the forests :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="get-appserver-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns all the appserver IDs from the configuration.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="config" type="element(configuration)">
        A configuration specification, typically as returned 
        from one of the Admin module functions.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:get-appserver-ids($config)
  (: returns the IDs of all the appservers :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="get-configuration" lib="admin" 
		category="Admin Library" bucket="XQuery Library Modules" subcategory="actions">
	  <apidoc:summary>Loads the admin configuration into memory for use 
		  by other functions in the Admin module.    </apidoc:summary>
	  <apidoc:return>element(configuration)</apidoc:return>
	  <apidoc:usage>
		  The configuration is loaded into memory only as it is 
		  needed, so it might not contain the entire configuration at
		  any given moment. It loads only the parts of the configuration
		  that are needed at the time they are needed to perform
		  other Admin module operations that specified in the XQuery 
		  request. Therefore, if you execute the function without 
		  calling any other Admin module functions, it will return
		  the empty sequence (because it never needed any of the 
		  config information to perform any of the Admin module
		  operations).
	  </apidoc:usage>
	  <apidoc:privilege><code>http://marklogic.com/xdmp/privileges/admin-module-read</code></apidoc:privilege>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-range-element-indexes($config, 
                           xdmp:database("Documents") )

  => The xml for any element range indexes in the "Documents"
     database, for example:
   <range-element-index xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	                xmlns="http://marklogic.com/xdmp/database">
      <scalar-type>date</scalar-type>
      <collation/>
      <namespace-uri>mynamespace</namespace-uri>
      <localname>myelementname</localname>
      <range-value-positions>false</range-value-positions>
   </range-element-index>
  ]]></pre>
    </apidoc:example>
  </apidoc:function>
  <apidoc:function name="save-configuration-without-restart" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="actions">
	  <apidoc:summary>
		  This function saves a configuration specification to 
		  the cluster configuration files, without restarting MarkLogic 
		  Server.  If you use this function to save any changes that
		  require a server restart ("cold" changes such as App Server
		  port assignment changes), then the changes will not take
		  effect until the next time MarkLogic Server restarts 
		  (although they will be saved in the configuration).  If you
		  want MarkLogic Server to automatically restart when needed,
		  use <code>admin:save-configuration</code> instead.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="config" type="element(configuration)">
		    A configuration specification, typically as returned 
		    from one of the Admin module functions.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:usage>
	    The return value is a list of the host IDs that need to be
	    restarted in order for the changes to take effect.
    </apidoc:usage>
	  <apidoc:privilege><code>http://marklogic.com/xdmp/privileges/admin-module-write</code></apidoc:privilege>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $spec := admin:forest-set-enabled($config, 
    xdmp:forest("myForest"), fn:true() )
  return
  admin:save-configuration-without-restart($spec)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="save-configuration" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="actions">
	  <apidoc:summary>
		  This function saves a configuration specification to 
		  the cluster configuration files.  It restarts MarkLogic 
		  Server for "cold" administrative tasks only (for example,
		  for App Server port assignment changes). If you do not want 
		  those "cold" administrative tasks to automatically restart
		  MarkLogic Server, use 
		  <code>admin:save-configuration-without-restart</code>
		  instead.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="config" type="element(configuration)">
		    A configuration specification, typically as returned 
		    from one of the Admin module functions.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>empty-sequence()</apidoc:return>
	  <apidoc:privilege><code>http://marklogic.com/xdmp/privileges/admin-module-write</code></apidoc:privilege>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $spec := admin:forest-set-enabled($config, 
    xdmp:forest("myForest"), fn:true() )
  return
  admin:save-configuration($spec)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="restart-hosts" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="actions">
	  <apidoc:summary>
		  This function restarts MarkLogic Server for the 
		  specified hosts.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="hosts" type="xs:unsignedLong*">
		   The host ID(s) for the host(s) you want to restart.
		   For example, <code>xdmp:host()</code> returns the ID for
		   the current host. 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>empty-sequence()</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
(: 
  This query restarts all hosts in the cluster.  Note that
  it will restart the host in which the query is run, too.
:)
xquery version "1.0-ml";

import module namespace admin = "http://marklogic.com/xdmp/admin" 
at "/MarkLogic/admin.xqy";
declare namespace host="http://marklogic.com/xdmp/status/host";

let $hostids := 
   for $id in xdmp:host-status(xdmp:host())
                               /host:hosts//host:host/host:host-id
   return fn:data($id)
return
admin:restart-hosts($hostids)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes the configuration from the 
		  specified database(s).  It does not delete the 
		  configuration or data for any forests attached to the 
		  deleted database(s).
	  </apidoc:summary>
    <apidoc:params>
            <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="database-ids" type="xs:unsignedLong*">
		    The id(s) for the specified database(s) (for example, 
	            <code>xdmp:database("myDatabase")</code>).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
     Any database whose ID you pass into this function must not have any appservers
     targeting it when the transaction begins, otherwise an exception is thrown.  
     If you need to delete the database, make sure no appserver targets the database
     in a separate transaction before calling this function. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-delete($config, admin:database-get-id($config, "foo"))

  => The new configuration with the specified databases removed.
     Use admin:save-configuration to save these changes. 
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-create" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function creates a new database specification.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-name" type="xs:string">
		    The name the database to create. The name must not be used
		    by any other database in the cluster.
	    </apidoc:param>
	    <apidoc:param name="security-db" type="xs:unsignedLong">
		    The ID of the security database (for example, 
		    <code>xdmp:database("Security")</code> used by 
		    this database.
	    </apidoc:param>
	    <apidoc:param name="schema-db" type="xs:unsignedLong">
		    The ID of the schemas database (for example, 
		    <code>xdmp:database("Schemas")</code> used by 
		    this database.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-create($config, "myNewDatabase", 
        xdmp:database("Security"), xdmp:database("Schemas"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-copy" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function creates a new database specification with the
		  same settings as the database with the specified ID.  The new
		  database configuration will have the specified name.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database to copy (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="database-name" type="xs:string">
	      The name of the new database to create.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-copy($config, xdmp:database("myOldDatabase"), 
                    "myNewDatabase")

   => Creates a configuration with a new database specification 
      having the same settings as the database named "myOldDatabase".
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-detach-forest" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function detaches the specified forest from the 
		  specified database.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
	    <apidoc:param name="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-detach-forest($config, xdmp:database("myDatabase"),
      xdmp:forest("myForest") )
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-attach-forest" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function attaches the specified forest to the 
		  specified database.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
	    <apidoc:param name="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
	   Any forest whose ID you pass into this function must exist when the 
	   transaction begins, otherwise an exception is thrown.  If you 
	   need to create the forest, do so in a separate transaction 
	   before using them in this function. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-attach-forest($config, xdmp:database("myDatabase"),
      xdmp:forest("myForest") )
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="database-get-backups" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function returns the scheduled backups
      for the specified database from the configuration.
    </apidoc:summary>
    <apidoc:params>
      <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="database-id" type="xs:unsignedLong">
        The id of the database (for example, 
        <code>xdmp:database("mydatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:database-backup)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-backups($config, xdmp:database("mydatabase") )
  (: returns the scheduled backups for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="database-weekly-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function constructs a weekly scheduled backup.
    </apidoc:summary>
    <apidoc:params>       
      <apidoc:param name="backup-dir" type="xs:string">
        The directory where the backup will be saved to.
      </apidoc:param>
      <apidoc:param name="backup-period" type="xs:positiveInteger">
        The how many weeks between each backup.
      </apidoc:param>
      <apidoc:param name="days" type="xs:string+">
        The day(s) of the week.  Must be a sequence of zero
        or more of <code>monday</code>, <code>tuesday</code>, 
        <code>wednesday</code>, <code>thusday</code>,
        <code>friday</code>, <code>saturday</code>,
        <code>sunday</code>.
      </apidoc:param>
      <apidoc:param name="start-time" type="xs:time">
        A time for the scheduled backup to start.
      </apidoc:param>
      <apidoc:param name="max-backups" type="xs:unsignedLong">
        The maximum number of backups to keep in the backup
        directory.
      </apidoc:param>
      <apidoc:param name="backup-security-db" type="xs:boolean">
        Whether to backup the security database alongside the
        current backup.
      </apidoc:param>
      <apidoc:param name="backup-schemas-db" type="xs:boolean">
        Whether to backup the schemas database alongside the
        current backup.
      </apidoc:param>
      <apidoc:param name="backup-triggers-db" type="xs:boolean">
        Whether to backup the triggers database alongside the
        current backup.
      </apidoc:param>
      <apidoc:param name="include-replicas" type="xs:boolean" optional="true">
	      If set to <code>false</code>, do not include the replicas in 
	      the backup.  The default is <code>true</code>, which means to 
	      include all replicas in the backup.
      </apidoc:param>    
    </apidoc:params>
    <apidoc:return>element(db:database-backup)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="database-monthly-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function constructs a monthly scheduled backup.
    </apidoc:summary>
    <apidoc:params>       
      <apidoc:param name="backup-dir" type="xs:string">
        The directory where the backup will be saved to.
      </apidoc:param>
      <apidoc:param name="backup-period" type="xs:positiveInteger">
        The number of months to elapse between each backup.
      </apidoc:param>
      <apidoc:param name="backup-month-day" type="xs:unsignedLong">
        The day of the month the backup will happen (between 1 and 31)
      </apidoc:param>
      <apidoc:param name="start-time" type="xs:time">
        A time for the scheduled backup to start.
      </apidoc:param>
      <apidoc:param name="max-backups" type="xs:unsignedLong">
        The maximum number of backups to keep in the backup
        directory.
      </apidoc:param>
      <apidoc:param name="backup-security-db" type="xs:boolean">
        Whether to backup the security database alongside the
        current backup.
      </apidoc:param>
      <apidoc:param name="backup-schemas-db" type="xs:boolean">
        Whether to backup the schemas database alongside the
        current backup.
      </apidoc:param>
      <apidoc:param name="backup-triggers-db" type="xs:boolean">
        Whether to backup the triggers database alongside the
        current backup.
      </apidoc:param>    
      <apidoc:param name="include-replicas" type="xs:boolean" optional="true">
	      If set to <code>false</code>, do not include the replicas in 
	      the backup.  The default is <code>true</code>, which means to 
	      include all replicas in the backup.
      </apidoc:param>    
    </apidoc:params>
    <apidoc:return>element(db:database-backup)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="database-one-time-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function constructs a one-time backup.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="backup-dir" type="xs:string">
        The directory where the backup will be saved to.
      </apidoc:param>
      <apidoc:param name="start" type="xs:dateTime">
        The starting dateTime of the scheduled backup.
      </apidoc:param>
      <apidoc:param name="max-backups" type="xs:unsignedLong">
        The maximum number of backups to keep in the backup
        directory.
      </apidoc:param>
      <apidoc:param name="backup-security-db" type="xs:boolean">
        Whether to backup the security database alongside the
        current backup.
      </apidoc:param>
      <apidoc:param name="backup-schemas-db" type="xs:boolean">
        Whether to backup the schemas database alongside the
        current backup.
      </apidoc:param>
      <apidoc:param name="backup-triggers-db" type="xs:boolean">
        Whether to backup the triggers database alongside the
        current backup.
      </apidoc:param>    
      <apidoc:param name="include-replicas" type="xs:boolean" optional="true">
	      If set to <code>false</code>, do not include the replicas in 
	      the backup.  The default is <code>true</code>, which means to 
	      include all replicas in the backup.
      </apidoc:param>    
    </apidoc:params>
    <apidoc:return>element(db:database-backup)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function adds scheduled backup specifications for a 
      database to a configuration. 
    </apidoc:summary>
    <apidoc:params>
      <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="database-id" type="xs:unsignedLong">
        The id of the database (for example, 
        <code>xdmp:database("mydatabase")</code>).
      </apidoc:param>
      <apidoc:param name="backups" type="element(db:database-backup)*">
        The scheduled backup specification(s), typically the result of
        an <code>admin:database-one-time-backup</code> or 
        an <code>admin:database-monthly-backup</code> or
        an <code>admin:database-weekly-backup</code> call
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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"))
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function deletes scheduled backup specifications for a 
      database from a configuration. 
    </apidoc:summary>
    <apidoc:params>
      <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="database-id" type="xs:unsignedLong">
        The id of the database (for example, 
        <code>xdmp:database("mydatabase")</code>).
      </apidoc:param>
      <apidoc:param name="backups" type="element(db:database-backup)*">
        The scheduled backup(s) to delete. Typically, the result of
        an <code>admin:database-get-backups</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $backups := admin:database-get-backups($config, $database)[1 to 3]
  return
  admin:database-delete-backup($config, $dbid, $backups)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
      
  <apidoc:function name="database-get-merge-blackouts" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the merge blackouts specification
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:merge-blackout)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-blackouts($config, xdmp:database("myDatabase") )
  (: returns the merge-blackouts specification for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-recurring-merge-blackout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a merge-blackout specification.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="limit" type="xs:unsignedInt">
		    The maximum number of megabytes for a merge.
	    </apidoc:param>
	    <apidoc:param name="merge-priority" type="xs:string">
	            The CPU scheduler priority for merges.  Must be one of
	            <code>normal</code> or <code>lower</code>.
	    </apidoc:param>
	    <apidoc:param name="days" type="xs:string+">
		    The day(s) of the week.  Must be a sequence of zero
		    or more of <code>monday</code>, <code>tuesday</code>, 
		    <code>wednesday</code>, <code>thusday</code>,
		    <code>friday</code>, <code>saturday</code>,
		    <code>sunday</code>.
	    </apidoc:param>
	    <apidoc:param name="start-time" type="xs:time?">
		    A time for the merge blackout to start.
	    </apidoc:param>
	    <apidoc:param name="end-time" type="xs:time?">
		    A time for the merge blackout to end.
	    </apidoc:param>
	    <apidoc:param name="duration" type="xs:duration?">
		    The amount of time for the blackout to last.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:merge-blackout)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-one-time-merge-blackout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a one-time merge-blackout 
		  specification.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="limit" type="xs:unsignedInt">
		    The maximum number of megabytes for a merge.
	    </apidoc:param>
	    <apidoc:param name="merge-priority" type="xs:string">
	            The CPU scheduler priority for merges.  Must be one of
	            <code>normal</code> or <code>lower</code>.
	    </apidoc:param>
	    <apidoc:param name="start" type="xs:dateTime">
		    The starting dateTime of the merge blackout.
	    </apidoc:param>
	    <apidoc:param name="end" type="xs:dateTime?">
		    The ending dateTime of the merge blackout.
	    </apidoc:param>
	    <apidoc:param name="duration" type="xs:duration?">
		    The amount of time for the blackout to last.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:merge-blackout)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  admin:database-one-time-merge-blackout(500, "lower",
        xs:dateTime("2008-02-14T09:45:00"), 
        (), xs:dayTimeDuration("PT3H") )
  (: returns the one-time merge-blackout specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-merge-blackout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a merge blackout specification for a 
		  database to a configuration. 
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="merge-blackouts" type="element(db:merge-blackout)*">
	      The merge blackout specification(s), typically the result of
	      an <code>admin:database-one-time-merge-blackout</code> or 
	      an <code>admin:database-recurring-merge-blackout</code> call
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-merge-blackout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a merge blackout specification for a 
		  database from a configuration. 
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="blackouts" type="element(db:merge-blackout)*">
	      The merge blackout(s) to delete. Typically, the result of
	      an <code>admin:database-get-merge-blackouts</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $mergespec := admin:database-get-merge-blackouts($config, 
        $dbid )
  return
  admin:database-delete-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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fragment-roots" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fragment roots specification
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:fragment-root)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fragment-roots($config, xdmp:database("myDatabase") )
  (: returns the fragments root specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-fragment-root" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a fragment root specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI. Specify an empty string if the 
	      element is in no namespace.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:fragment-root)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $namespace := "my/namespace"
  let $localname := "some-element-name"
  return
  admin:database-fragment-root($namespace, $localname )
  (: returns the fragments root specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-fragment-root" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds the specified fragment root to the specified 
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="fragment-roots" type="element(db:fragment-root)*">
	      A fragment root specification, typically the result of an
	      <code>admin:database-fragment-root</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $fragspec := admin:database-fragment-root("my/namespace", "element-name")
  return
  admin:database-add-fragment-root($config, $dbid, $fragspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-fragment-root" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes the specified fragment root in the 
		  specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
     <apidoc:param name="fragment-roots" type="element(db:fragment-root)*">
	      A fragment root specification, typically the result of an
	      <code>admin:database-fragment-root</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $fragspec := admin:database-fragment-root("my/namespace", "element-name")
  return
  admin:database-delete-fragment-root($config, $dbid, $fragspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fragment-parents" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fragment parents specification
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:fragment-parent)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fragment-parents($config, xdmp:database("myDatabase") )
  (: returns the fragments parent specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-fragment-parent" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a fragment parent specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI. Specify an empty string if the 
	      element is in no namespace.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:fragment-parent)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $namespace := "my/namespace"
  let $localname := "some-element-name"
  return
  admin:database-fragment-parent($namespace, $localname )
  (: returns the fragments parent specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-fragment-parent" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds the specified fragment parent to the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="fragment-parents" type="element(db:fragment-parent)*">
	      A fragment parent specification, typically the result of an
	      <code>admin:database-fragment-parent</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $fragspec := admin:database-fragment-parent("my/namespace", "element-name")
  return
  admin:database-add-fragment-parent($config, $dbid, $fragspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-fragment-parent" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes the specified fragment parent in the 
		  specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="fragment-parents" type="element(db:fragment-parent)*">
	      A fragment parent specification, typically the result of an
	      <code>admin:database-fragment-parent</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $fragspec := admin:database-fragment-parent("my/namespace", "element-name")
  return
  admin:database-delete-fragment-parent($config, $dbid, $fragspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-range-element-index" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a range element index
		  specification.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="scalar-type" type="xs:string">
		    A valid type for the range index.  Must be one of: 
		    <code>int</code>, <code>unsignedInt</code>,
		    <code>long</code>, <code>unsignedLong</code>, 
		    <code>float</code>, <code>double</code>,
		    <code>decimal</code>, <code>dateTime</code>,
		    <code>time</code>, <code>date</code>,
		    <code>gYearMonth</code>, <code>gYear</code>,
		    <code>gMonth</code>, <code>gDay</code>,
	    <code>yearMonthDuration</code>, <code>dayTimeDuration</code>,
	    <code>string</code>, <code>anyURI</code>, or
	    <code>point</code>.
	    </apidoc:param>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
      <apidoc:param name="collation" type="xs:string">
	      The collation URI (for example, 
	      <code>http://marklogic.com/collation/</code>).  The collation
	      is only needed for string and anyURI indexes; for other indexes, 
	      specify the empty string ("") for this parameter.
      </apidoc:param>
      <apidoc:param name="range-value-positions" type="xs:boolean">
	      A boolean specifying whether to maintain value postions
	      in this index (used with co-occurrences).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:range-element-index)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-range-element-indexes" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the range element indexes 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:range-element-index)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-range-element-indexes($config, xdmp:database("myDatabase") )
  (: returns the range index specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-range-element-index" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a range element index to the specified
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="range-indexes" type="element(db:range-element-index)*">
	      An element range index specification, typically the result of an
	      <code>admin:database-range-element-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-range-element-index" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" 
	  subcategory="database">
	  <apidoc:summary>
		  This function deletes a range element index for the specified
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="range-indexes" 
	      type="element(db:range-element-index)*">
	      An element range index specification, typically the result of an
	      <code>admin:database-range-element-index</code> call.  
      </apidoc:param>
    </apidoc:params>
    <apidoc:usage>
	    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 <code>admin:database-get-range-element-index</code>.
    </apidoc:usage>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-range-element-attribute-indexes" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the range element attribute
		  indexes specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:range-element-attribute-index)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-range-element-attribute-indexes($config, 
        xdmp:database("myDatabase") )
  (: returns the range element attribute index specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-range-element-attribute-index" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a range element attribute index
		  specification.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="scalar-type" type="xs:string">
		    A valid type for the range index.  Must be one of: 
		    <code>int</code>, <code>unsignedInt</code>,
		    <code>long</code>, <code>unsignedLong</code>, 
		    <code>float</code>, <code>double</code>,
		    <code>decimal</code>, <code>dateTime</code>,
		    <code>time</code>, <code>date</code>,
		    <code>gYearMonth</code>, <code>gYear</code>,
		    <code>gMonth</code>, <code>gDay</code>,
	    <code>yearMonthDuration</code>, <code>dayTimeDuration</code>,
	    <code>string</code>, <code>anyURI</code>, or
	    <code>point</code>.
	    </apidoc:param>
	    <apidoc:param name="parent-namespace" type="xs:string?">
		    The namespace of the parent element for the attribute.
	    </apidoc:param>
	    <apidoc:param name="parent-localname" type="xs:string">
		    The local name of the parent element for the attribute.
	    </apidoc:param>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
      <apidoc:param name="collation" type="xs:string">
	      The collation URI (for example, 
	      <code>http://marklogic.com/collation/</code>. The collation
	      is only needed for string and anyURI indexes; for other indexes, 
	      specify the empty string ("") for this parameter.
      </apidoc:param>
      <apidoc:param name="range-value-positions" type="xs:boolean">
	      A boolean specifying whether to maintain value postions
	      in this index (used with co-occurrences).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:range-element-attribute-index)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-range-element-attribute-index"
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a range element attribute index to the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="attribute-indexes" 
	      type="element(db:range-element-attribute-index)*">
	An element attribute range index specification, typically the result of an
	<code>admin:database-range-element-attribute-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-range-element-attribute-index" 
	  lib="admin" category="Admin Library" 
	  bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a range element attribute index for 
		  the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="attribute-indexes" 
	      type="element(db:range-element-attribute-index)*">
	      An element attribute range index specification, typically the 
	      result of an
	      <code>admin:database-range-element-attribute-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:usage>
	    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 <code>admin:database-get-range-element-attribute-index</code>.
    </apidoc:usage>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-element-word-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs an element word lexicon specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
      <apidoc:param name="collation" type="xs:string">
	      The collation URI (for example, 
	      <code>http://marklogic.com/collation/</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:element-word-lexicon)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:database-element-word-lexicon("my/namepsace", "elementname", 
	"http://marklogic.com/collation/" )
  (: returns the element word lexicon specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-element-word-lexicons" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the element word lexicons 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:element-word-lexicon)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-element-word-lexicons($config, xdmp:database("myDatabase") )
  (: returns the element word lexicon specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-element-word-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds an element word lexicon to the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="element-word-lexicons" 
	      type="element(db:element-word-lexicon)*">
	An element word lexicon specification, typically the result of an
	<code>admin:database-element-word-lexicon</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-lexicon("my/namepsace", 
     "elementname", "http://marklogic.com/collation/" )
  return
  admin:database-add-element-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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-element-word-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes an element word lexicon for the 
		  specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="element-word-lexicons" 
	      type="element(db:element-word-lexicon)*">
	An element word lexicon specification, typically the result of an
	<code>admin:database-element-word-lexicon</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-lexicon("my/namepsace", 
     "elementname", "http://marklogic.com/collation/" )
  return
  admin:database-delete-element-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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-element-attribute-word-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs an element attribute word 
		  lexicon specification.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="parent-namespace" type="xs:string?">
		    The namespace of the parent element for the attribute.
	    </apidoc:param>
	    <apidoc:param name="parent-localname" type="xs:string">
		    The local name of the parent element for the attribute.
	    </apidoc:param>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
      <apidoc:param name="collation" type="xs:string">
	      The collation URI (for example, 
	      <code>http://marklogic.com/collation/</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:element-attribute-word-lexicon)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:database-element-attribute-word-lexicon("my/namepsace", "elementname", 
	"", "myAttribute", "http://marklogic.com/collation/" )
  (: returns the element attribute word lexicon specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-element-attribute-word-lexicons" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the element attribute word lexicons 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:element-attribute-word-lexicon)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-element-attribute-word-lexicons($config, 
        xdmp:database("myDatabase") )
  (: returns the element attribute word lexicon specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-element-attribute-word-lexicon" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds an element attribute word lexicon to the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="element-attribute-word-lexicons" 
	      type="element(db:element-attribute-word-lexicon)*">
	An element word lexicon specification, typically the result of an
	<code>admin:database-element-word-lexicon</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-element-attribute-word-lexicon" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes an element attribute word lexicon for the 
		  specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="lexicons" 
	      type="element(db:element-attribute-word-lexicon)*">
	An element attribute word lexicon specification, typically the result of an
	<code>admin:database-element-attribute-word-lexicon</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-phrase-through" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a phrase through specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:phrase-through)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:database-phrase-through("my/namepsace", "elementname" )
  (: returns the phrase through specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-phrase-throughs" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the phrase throughs 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:phrase-through)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-phrase-throughs($config, 
        xdmp:database("myDatabase") )
  (: returns the phrase through specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-phrase-through" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a phrase through to the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="phrase-throughs" type="element(db:phrase-through)*">
	A phrase through specification, typically the result of an
	<code>admin:database-phrase-through</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $ptspec := admin:database-phrase-through("my/namepsace", 
     "elementname" )
  return
  admin:database-add-phrase-through($config, $dbid, $ptspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-phrase-through" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a phrase through for the 
		  specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="phrase-throughs" type="element(db:phrase-through)*">
	A phrase through specification, typically the result of an
	<code>admin:database-phrase-through</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $ptspec := admin:database-phrase-through("my/namepsace", 
     "elementname" )
  return
  admin:database-delete-phrase-through($config, $dbid, $ptspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-phrase-around" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a phrase through specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:phrase-around)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:database-phrase-around("my/namepsace", "elementname" )
  (: returns the phrase around specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-phrase-arounds" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the phrase arounds 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:phrase-around)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-phrase-arounds($config, 
        xdmp:database("myDatabase") )
  (: returns the phrase arounds specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-phrase-around" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a phrase around to the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="phrase-arounds" type="element(db:phrase-around)*">
	A phrase around specification, typically the result of an
	<code>admin:database-phrase-around</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $paspec := admin:database-phrase-around("my/namepsace", 
     "elementname" )
  return
  admin:database-add-phrase-around($config, $dbid, $paspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-phrase-around" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a phrase around for the 
		  specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="phrase-arounds" type="element(db:phrase-around)*">
	A phrase specification, typically the result of an
	<code>admin:database-phrase-through</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $paspec := admin:database-phrase-around("my/namepsace", 
     "elementname" )
  return
  admin:database-delete-phrase-around($config, $dbid, $paspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-element-word-query-through" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs an element word query
		  through specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:element-word-query-through)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:database-element-word-query-through("my/namepsace", "elementname" )
  (: returns the element word query through specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-element-word-query-throughs" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the element word query throughs 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:element-word-query-through)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-element-word-query-throughs($config, 
        xdmp:database("myDatabase") )
  (: returns the element word query through specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-element-word-query-through"
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds an element word query through to the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="element-word-query-throughs" 
	      type="element(db:element-word-query-through)*">
	An element word query through specification, typically the result of an
	<code>admin:database-element-word-query-through</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $ewqtspec := admin:database-element-word-query-through("my/namepsace", 
     "elementname" )
  return
  admin:database-add-element-word-query-through($config, $dbid, $ewqtspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-element-word-query-through" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" 
	  subcategory="database">
	  <apidoc:summary>
		  This function deletes an element word query through for the 
		  specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="throughs" 
	      type="element(db:element-word-query-through)*">
	An element word query through specification, typically the result of an
	<code>admin:database-element-word-query-through</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 $ewqtspec := admin:database-element-word-query-through("my/namepsace", 
     "elementname" )
  return
  admin:database-delete-element-word-query-through($config, $dbid, $ewqtspec)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-word-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a word lexicon specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="collation" type="xs:string">
	      The collation URI (for example, 
	      <code>http://marklogic.com/collation/</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:word-lexicon)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:database-word-lexicon("http://marklogic.com/collation/")
  (: returns the word lexicon specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-lexicons" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the word lexicons 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:word-lexicon)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-lexicons($config, xdmp:database("myDatabase") )
  (: returns the word lexicon specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-word-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a word lexicon to the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="word-lexicons" type="element(db:word-lexicon)*">
	A word lexicon specification, typically the result of an
	<code>admin:database-word-lexicon</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-lexicon("http://marklogic.com/collation/")
  return
  admin:database-add-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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-word-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a word lexicon for the 
		  specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="word-lexicons" type="element(db:word-lexicon)*">
	A word lexicon specification, typically the result of an
	<code>admin:database-word-lexicon</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-lexicon("http://marklogic.com/collation/")
  return
  admin:database-delete-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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-geospatial-element-index" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a geospatial element index
		  specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
      <apidoc:param name="coordinate-system" type="xs:string">
	      The coordinate system.  Must be one of <code>wgs84</code> or
	      <code>raw</code>.
      </apidoc:param>
      <apidoc:param name="range-value-positions" type="xs:boolean">
	      A boolean specifying whether to maintain value postions
	      in this index (used with co-occurrences).
      </apidoc:param>
      <apidoc:param name="point-format" type="xs:string" optional="true">
	      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.
      </apidoc:param>
   </apidoc:params>
    <apidoc:return>element(db:geospatial-element-index)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:database-geospatial-element-index(
           "/my/namespace",
           "elementname", 
	   "wgs84", 
	   fn:false(), 
	   "long-lat-point" )

  (: returns the geospatial element index specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-geospatial-element-indexes" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the geospatial element indexes 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:geospatial-element-index)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-geospatial-element-indexes($config, 
        xdmp:database("myDatabase") )
  (: returns the geospatial index specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-geospatial-element-index" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a range element index to the specified
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="geospatial-element-indexes" 
	      type="element(db:geospatial-element-index)*">
	      A  geospatial element index specification, typically the result of 
	      an <code>admin:database-geospatial-element-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-geospatial-element-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a geospatial element index for the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="geospatial-element-indexes" 
	      type="element(db:geospatial-element-index)*">
	      A geospatial element index specification, typically the result of an
	      <code>admin:database-geospatial-element-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-geospatial-element-child-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a geospatial element child index
		  specification.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="parent-namespace" type="xs:string?">
		    The namespace of the parent element for the attribute.
	    </apidoc:param>
	    <apidoc:param name="parent-localname" type="xs:string">
		    The local name of the parent element for the attribute.
	    </apidoc:param>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI. Specify an empty string if the 
	      element is in no namespace.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
      <apidoc:param name="coordinate-system" type="xs:string">
	      The coordinate system.  Must be one of <code>wgs84</code> or
	      <code>raw</code>.
      </apidoc:param>
      <apidoc:param name="range-value-positions" type="xs:boolean">
	      A boolean specifying whether to maintain value postions
	      in this index (used with co-occurrences).
      </apidoc:param>
      <apidoc:param name="point-format" type="xs:string" optional="true">
	      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.
      </apidoc:param>
   </apidoc:params>
    <apidoc:return>element(db:geospatial-element-child-index)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-geospatial-element-child-indexes" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the geospatial element child indexes 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:geospatial-element-child-index)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-geospatial-element-child-indexes($config, 
        xdmp:database("myDatabase") )
  (: returns the geospatial element child index specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-geospatial-element-child-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a geospatial element child index to 
		  the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="geospatial-element-child-indexes" 
	      type="element(db:geospatial-element-child-index)*">
	      A  geospatial element child index specification, typically 
	      the result of 
	      an <code>admin:database-geospatial-element-child-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-geospatial-element-child-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a geospatial element child index for the 
		  specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="geospatial-element-child-indexes" 
	      type="element(db:geospatial-element-child-index)*">
	      A geospatial element child index specification, typically 
	      the result of an
	      <code>admin:database-geospatial-element-child-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-geospatial-element-pair-index" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a geospatial element pair index
		  specification.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="parent-namespace" type="xs:string?">
		    The namespace of the parent element for the attribute.
	    </apidoc:param>
	    <apidoc:param name="parent-localname" type="xs:string">
		    The local name of the parent element for the attribute.
	    </apidoc:param>
	    <apidoc:param name="latitude-namespace" type="xs:string?">
		    The namespace for the element containing the latitude.
	    </apidoc:param>
	    <apidoc:param name="latitude-localname" type="xs:string">
		    The local name for the element containing the latitude.
	    </apidoc:param>
	    <apidoc:param name="longitude-namespace" type="xs:string?">
		    The namespace for the element containing the longitude.
	    </apidoc:param>
	    <apidoc:param name="longitude-localname" type="xs:string">
		    The local name for the element containing the longitude.
	    </apidoc:param>
      <apidoc:param name="coordinate-system" type="xs:string">
	      The coordinate system.  Must be one of <code>wgs84</code> or
	      <code>raw</code>.
      </apidoc:param>
      <apidoc:param name="range-value-positions" type="xs:boolean">
	      A boolean specifying whether to maintain value postions
	      in this index (used with co-occurrences).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:geospatial-element-pair-index)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-geospatial-element-pair-indexes" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the geospatial element pair indexes 
		  specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:geospatial-element-pair-index)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-geospatial-element-pair-indexes($config, 
       xdmp:database("myDatabase"))
  (: returns the specification :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-geospatial-element-pair-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a geospatial element pair index to 
		  the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="geospatial-element-pair-indexes" 
	      type="element(db:geospatial-element-pair-index)*">
	      A  geospatial element pair index specification, typically 
	      the result of 
	      an <code>admin:database-geospatial-element-pair-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-geospatial-element-pair-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a geospatial element pair index for 
		  the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="geospatial-element-pair-indexes" 
	      type="element(db:geospatial-element-pair-index)*">
	      A  geospatial element pair index specification, typically 
	      the result of 
	      an <code>admin:database-geospatial-element-pair-index</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-geospatial-element-attribute-pair-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a geospatial element attribute 
		  pair index specification.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="parent-namespace" type="xs:string?">
		    The namespace of the parent element for the attribute.
	    </apidoc:param>
	    <apidoc:param name="parent-localname" type="xs:string">
		    The local name of the parent element for the attribute.
	    </apidoc:param>
	    <apidoc:param name="latitude-namespace" type="xs:string?">
		    The namespace for the element containing the latitude.
	    </apidoc:param>
	    <apidoc:param name="latitude-localname" type="xs:string">
		    The local name for the element containing the latitude.
	    </apidoc:param>
	    <apidoc:param name="longitude-namespace" type="xs:string?">
		    The namespace for the element containing the longitude.
	    </apidoc:param>
	    <apidoc:param name="longitude-localname" type="xs:string">
		    The local name for the element containing the longitude.
	    </apidoc:param>
      <apidoc:param name="coordinate-system" type="xs:string">
	      The coordinate system.  Must be one of <code>wgs84</code> or
	      <code>raw</code>.
      </apidoc:param>
      <apidoc:param name="range-value-positions" type="xs:boolean">
	      A boolean specifying whether to maintain value postions
	      in this index (used with co-occurrences).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:geospatial-element-attribute-pair-index)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function 
	  name="database-get-geospatial-element-attribute-pair-indexes"
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the geospatial element attribute pair 
		  indexes specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:geospatial-element-attribute-pair-index)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-geospatial-element-attribute-pair-indexes($config, 
        xdmp:database("myDatabase") )
  (: returns the geospatial element attribute pair index specifications for the database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-geospatial-element-attribute-pair-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds a geospatial element attribute 
		  pair index to the specified
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="geospatial-element-attribute-pair-indexes" 
	      type="element(db:geospatial-element-attribute-pair-index)*">
	      A  geospatial element attribute pair index specification, typically 
	      the result of an 
	      <code>admin:database-geospatial-element-attribute-pair-index</code> 
	      call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function 
	  name="database-delete-geospatial-element-attribute-pair-index" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes a geospatial element attribute 
		  pair index in the specified
		  database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="indexes" 
	      type="element(db:geospatial-element-attribute-pair-index)*">
	   A  geospatial element attribute pair index specification, 
	   typically the result of an 
	   <code>admin:database-geospatial-element-attribute-pair-index</code> 
	   call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function changes the name of the database with the
		  specified ID to the specified name.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new name for the database.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:database-set-name($config, $dbid, "myNewDatabaseName")
  (: 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.  :)   
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-enabled" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the enabled value
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      The new boolean value.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-enabled($config, xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-security-database" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the security database for a database
		  to the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedLong">
	      The new database ID for the auxiliary database.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-security-database($config, xdmp:database("myDatabase"),
        xdmp:database("mySecurityDatabase"))
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-schema-database" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the schema database for a database
		  to the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedLong">
	      The new database ID for the auxiliary database.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-schema-database($config, xdmp:database("myDatabase"),
        xdmp:database("mySchemasDatabase"))
 (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-triggers-database" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the triggers database to the specified
		  database ID for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
     <apidoc:param name="value" type="xs:unsignedLong">
	      The new database ID for the auxiliary database.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-triggers-database($config, xdmp:database("myDatabase"),
        xdmp:database("myTriggersDatabase"))
 (: 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.  :) 
     ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-language" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the language
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The locale string representing the new language.  Must be
	      a valid value for <code>xml:lang</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-language($config, xdmp:database("myDatabase"),
        "fr")
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-stemmed-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the stemmed searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new stemmed search value.  Must be one of
	      <code>off</code>, <code>basic</code>, <code>advanced</code>,
	      or <code>decompounding</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-stemmed-searches($config, xdmp:database("myDatabase"),
        "advanced")
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-searches($config, xdmp:database("myDatabase"),
        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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-positions" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word positions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-positions($config, xdmp:database("myDatabase"),
        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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-fast-phrase-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the fast phrase searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-phrase-searches($config, xdmp:database("myDatabase"),
        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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-fast-case-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the fast case sensitive searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-case-sensitive-searches($config, xdmp:database("myDatabase"),
        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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-fast-reverse-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the fast reverse searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-reverse-searches($config, xdmp:database("myDatabase"),
        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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-fast-diacritic-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the fast diacritic-sensitive searches 
		  setting for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-diacritic-sensitive-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-fast-element-word-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the element word searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-element-word-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-element-word-positions" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the element word positions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-element-word-positions($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-fast-element-phrase-searches"
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the fast element phrase searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-element-phrase-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-element-value-positions" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the element value positions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-element-value-positions($config, xdmp:database("myDatabase"),
        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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-attribute-value-positions" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the attribute value positions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-attribute-value-positions($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-trailing-wildcard-searches" lib="admin"  
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the trailing wildcard searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-trailing-wildcard-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-trailing-wildcard-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the trailing wildcard word positions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-trailing-wildcard-word-positions($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-fast-element-trailing-wildcard-searches" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the fast element trailing wildcard searches 
		  setting for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-trailing-wildcard-word-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-three-character-searches" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the three character searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-three-character-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-three-character-word-positions" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the three character word positions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-three-character-word-positions($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-two-character-searches" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the two character searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-two-character-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-one-character-searches" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the one character searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-one-character-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-fast-element-character-searches" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the fast element character searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-element-character-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-uri-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the URI lexicon setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-uri-lexicon($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-collection-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the collection lexicon setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-collection-lexicon($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-reindexer-enable" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the reindexer enable setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-reindexer-enable($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-maintain-last-modified" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the maintain last modified setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-maintain-last-modified($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-maintain-directory-last-modified" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the maintain directory last modified setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-maintain-directory-last-modified($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-inherit-permissions" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the inherit permissions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-inherit-permissions($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-inherit-collections" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the inherit collections setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-inherit-collections($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-inherit-quality" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the inherit quality setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-inherit-quality($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-preallocate-journals" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the preallocate journals setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-preallocate-journals($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-preload-mapped-data" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the preload mapped data setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-preload-mapped-data($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-range-index-optimize" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the range index optimize setting
		  for the specified database in the configuration.  

		  When set to <code>facet-time</code>, range indexes are
		  optimized to minimize the amount of CPU time
		  used. When set to <code>memory-size</code>, range
		  indexes are optimized to minimize the amount of memory
		  used.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new range index optimize value.  Must be one of
	      <code>facet-time</code> or <code>memory-size</code>.  
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-range-index-optimize($config, xdmp:database("myDatabase"),
        "memory-size")
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-merge-enable" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the merge enable setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-enable($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-directory-creation" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the directory creation setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new directory creation setting.  Must be one of:
	      <code>automatic</code>, <code>manual-enforced</code>,
	      or <code>manual</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-directory-creation($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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-format-compatibility" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the format cpmpatibility setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new format-compatibility setting.  Must be one of:
	      <code>automatic</code>, <code>4.0</code>,
	      <code>3.2</code>, <code>3.1</code>, <code>3.0</code>, 
	      or <code>2.2</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-index-detection" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the index detection setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new index detection setting.  Must be one of:
	      <code>automatic</code> or <code>none</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-index-detection($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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-expunge-locks" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the expunge locks setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new expunge locks setting.  Must be one of:
	      <code>automatic</code> or <code>none</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-expunge-locks($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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-reindexer-timestamp" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the reindexer timestamp setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The system timestamp before which fragments will be reindexed.
	      0 indicates no forced reindex.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-reindexer-timestamp($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-in-memory-limit" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the in-memory limit setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new value, indicating the maximum number of fragments allowed
	      in an in-memory stand before it is saved to disk.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-limit($config, 
        xdmp:database("myDatabase"), 65536)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-in-memory-list-size" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the in-memory list size setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new size, in megabytes.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-list-size($config, 
        xdmp:database("myDatabase"), 256)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-in-memory-tree-size" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the in-memory tree size setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new size, in megabytes.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-tree-size($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-in-memory-range-index-size" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the in-memory range index size setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new size, in megabytes.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-range-index-size($config, 
        xdmp:database("myDatabase"), 8)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-in-memory-reverse-index-size" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the in-memory range reverse index 
		  size setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new size, in megabytes.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-reverse-index-size($config, 
        xdmp:database("myDatabase"), 8)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-locking" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the locking setting for the
		  specified database in the configuration.  When set to
		  <code>strict</code>, locking enforces mutual exclusion
		  on existing documents and on new documents.  When set
		  to <code>fast</code>, locking enforces mutual
		  exclusion on existing documents but not on new
		  documents.  When set to <code>off</code>, locking does
		  not enforce mutual exclusion on existing documents or
		  on new documents.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new locking value.  Must be one of
	      <code>strict</code>, <code>fast</code>,
	      or <code>off</code>.  
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-journaling" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the journaling setting for the
		  specified database in the configuration.  When set
		  to <code>strict</code>, the journal protects against
		  MarkLogic Server process failures, host operating
		  system kernel failures, and host hardware failures.
		  When set to <code>fast</code>, the journal protects
		  against MarkLogic Server process failures but not
		  against host operating system kernel failures or host
		  hardware failures.  When set to <code>off</code>, the
		  journal does not protect against MarkLogic Server
		  process failures, host operating system kernel
		  failures, or host hardware failures.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new journaling value.  Must be one of
	      <code>strict</code>, <code>fast</code>,
	      or <code>off</code>.  
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-journal-size" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the journal size setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new size, in megabytes.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-journal-size($config, 
        xdmp:database("myDatabase"), 320)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-positions-list-max-size" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the positions list max size setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new size, in megabytes.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-positions-list-max-size($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-merge-max-size" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the merge max size setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new size, in megabytes.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-max-size($config, 
        xdmp:database("myDatabase"), 500)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-merge-min-size" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the merge minimum size setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new size, in number of fragments.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-min-size($config, 
        xdmp:database("myDatabase"), 5000)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-merge-min-ratio" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the merge min ratio setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new ratio.  Larger ratios trigger more merges.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-min-ratio($config, 
        xdmp:database("myDatabase"), 2)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-merge-priority" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the CPU scheduler priority for merges.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new CPU scheduler priority value.  Must be one of
	      <code>normal</code> or <code>lower</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-priority($config, 
        xdmp:database("myDatabase"), "lower")
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-merge-timestamp" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the merge timestamp setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedLong">
	      The new system timestamp after which to preserve fragments in
	      a merge.  A value of 0 indicates to keep only the latest version
	      of fragments.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-timestamp($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-reindexer-throttle" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the reindexer throttle setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new setting, which must be a number between
	      1 and 5 (inclusive).  Larger numbers mean to work harder at 
	      reindexing.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-reindexer-throttle($config, 
        xdmp:database("myDatabase"), 5)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-attached-forests" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the attached forest IDs
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-attached-forests($config, xdmp:database("myDatabase"))
  (: returns the IDs of the attached forests :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-id" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the ID for the specified database from the configuration.
		  The difference between this function and <code>xdmp:database()</code> 
		  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.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-name" type="xs:string">
		    The name of the database.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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" :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-enabled" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the enabled value
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-enabled($config, xdmp:database("myDatabase"))
  (: returns the enabled setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the name
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-name($config, xdmp:database("myDatabase"))
  (: returns the name setting :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-security-database" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the ID of the security database
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-security-database($config, xdmp:database("myDatabase"))
  (: returns the ID of the security database :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-schema-database" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the ID of the schema database
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-schema-database($config, xdmp:database("myDatabase"))
  (: returns the ID of the schema database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-triggers-database" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the ID of the triggers database
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-triggers-database($config, xdmp:database("myDatabase"))
  (: returns the ID of the triggers database :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-language" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the language
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-language($config, xdmp:database("myDatabase"))
  (: returns the language setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-stemmed-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the stemmed searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-stemmed-searches($config, xdmp:database("myDatabase"))
  (: returns the stemmed searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the word searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-searches($config, xdmp:database("myDatabase"))
  (: returns the word searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-positions" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the word positions setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-positions($config, xdmp:database("myDatabase"))
  (: returns the word positions setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fast-phrase-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fast phrase searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-phrase-searches($config, xdmp:database("myDatabase"))
  (: returns the fast phrase searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fast-case-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fast case sensitive searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-case-sensitive-searches($config, xdmp:database("myDatabase"))
  (: returns the fast case sensitive searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fast-reverse-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fast reverse searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-reverse-searches($config, xdmp:database("myDatabase"))
  (: returns the stemmed searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fast-diacritic-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fast diacritic sensitive 
		  searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-diacritic-sensitive-searches($config, 
      xdmp:database("myDatabase"))
  (: returns the fast diacritic sensitive searches setting :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fast-element-word-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fast element word searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-element-word-searches($config, 
       xdmp:database("myDatabase"))
  (: returns the element word searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-element-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the element word positions setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-element-word-postions($config, xdmp:database("myDatabase"))
  (: returns the element word positions setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fast-element-phrase-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fast element phrase searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-element-phrase-searches($config, 
       xdmp:database("myDatabase"))
  (: returns the fast element phrase searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-element-value-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the element value positions setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-element-value-positions($config, 
        xdmp:database("myDatabase"))
  (: returns the element value positions setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-attribute-value-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the attribute value positions setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-attribute-value-positions($config, 
        xdmp:database("myDatabase"))
  (: returns the attribute value positions setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-trailing-wildcard-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the trailing wildcard searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-trailing-wildcard-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the trailing wildcard searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-trailing-wildcard-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the trailing wildcard word  
		  positions setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-trailing-wildcard-word-positions($config, 
        xdmp:database("myDatabase"))
  (: returns the trailing wildcard word positions setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fast-element-trailing-wildcard-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the trailing wildcard searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-element-trailing-wildcard-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the fast element trailing wildcard searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-three-character-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the three character searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-three-character-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the three character searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-three-character-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the three character word positions 
		  setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-three-character-word-positions($config, 
        xdmp:database("myDatabase"))
  (: returns the three character word positions setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-two-character-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the two character searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-two-character-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the two character searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-one-character-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the one character searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-one-character-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the one character searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fast-element-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fast element character 
		  searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-element-character-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the fast element character searches setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-uri-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the URI lexicon setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-uri-lexicon($config, xdmp:database("myDatabase"))
  (: returns the uri lexicon setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-collection-lexicon" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the collection lexicon setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-collection-lexicon($config, xdmp:database("myDatabase"))
  (: returns the collection lexicon setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-reindexer-enable" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the reindexer enable setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-reindexer-enable($config, xdmp:database("myDatabase"))
  (: returns the reindexer enable setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-maintain-last-modified" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the maintain last modified setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-maintain-last-modified($config, xdmp:database("myDatabase"))
  (: returns the maintain last modified setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-maintain-directory-last-modified" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the maintain directory last
		  modified setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-maintain-directory-last-modified($config, xdmp:database("myDatabase"))
  (: returns the maintain directory last modified setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-inherit-permissions" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the inherit positions setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-inherit-permissions($config, xdmp:database("myDatabase"))
  (: returns the inherit permissions setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-inherit-collections" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the inherit collections setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-inherit-collections($config, xdmp:database("myDatabase"))
  (: returns the inherit collections setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-inherit-quality" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the inherit quality setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-inherit-quality($config, xdmp:database("myDatabase"))
  (: returns the inherit quality setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-preallocate-journals" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the preallocate journals setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-preallocate-journals($config, xdmp:database("myDatabase"))
  (: returns the preallocate journals setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-preload-mapped-data" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the preload mapped data setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-preload-mapped-data($config, xdmp:database("myDatabase"))
  (: returns the preload mapped data setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-range-index-optimize" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the range index optimize setting
		  for the specified database from the configuration.
		  When set to <code>facet-time</code>, range indexes are
		  optimized to minimize the amount of CPU time
		  used. When set to <code>memory-size</code>, range
		  indexes are optimized to minimize the amount of memory
		  used.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-range-index-optimize($config, xdmp:database("myDatabase"))
  (: returns the range index optimize setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-merge-enable" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the merge enable setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-enable($config, xdmp:database("myDatabase"))
  (: returns the merge enable setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-directory-creation" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the directory creation setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-directory-creation($config, xdmp:database("myDatabase"))
  (: returns the directory creation setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-format-compatibility" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the format compatibility setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-format-compatibility($config, xdmp:database("myDatabase"))
  (: returns the format compatibility setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-index-detection" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the index detection setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-index-detection($config, xdmp:database("myDatabase"))
  (: returns the index detection setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-expunge-locks" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the expunge locks setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-expunge-locks($config, xdmp:database("myDatabase"))
  (: returns the expunge-locks setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-reindexer-timestamp" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the reindexer timestamp setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-reindexer-timestamp($config, xdmp:database("myDatabase"))
  (: returns the reindexer timestamp setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-in-memory-limit" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the in memory limit setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-limit($config, xdmp:database("myDatabase"))
  (: returns the in memory limit setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-in-memory-list-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the in memory list size setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-list-size($config, xdmp:database("myDatabase"))
  (: returns the in memory list size setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-in-memory-tree-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the in memory tree size setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-tree-size($config, xdmp:database("myDatabase"))
  (: returns the in memory tree size setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-in-memory-range-index-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the in memory range index size setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-range-index-size($config, 
        xdmp:database("myDatabase"))
  (: returns the in memory range index size setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-in-memory-reverse-index-size" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the in memory reverse index size setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-in-memory-reverse-index-size($config, 
        xdmp:database("myDatabase"))
  (: returns the in memory reverse index size setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-locking" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the locking setting for the
		  specified database in the configuration.  When set to
		  <code>strict</code>, locking enforces mutual exclusion
		  on existing documents and on new documents.  When set
		  to <code>fast</code>, locking enforces mutual
		  exclusion on existing documents but not on new
		  documents.  When set to <code>off</code>, locking does
		  not enforce mutual exclusion on existing documents or
		  on new documents.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-locking($config, xdmp:database("myDatabase"))
  (: returns the locking setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-journaling" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the journaling setting for the
		  specified database in the configuration.  When set
		  to <code>strict</code>, the journal protects against
		  MarkLogic Server process failures, host operating
		  system kernel failures, and host hardware failures.
		  When set to <code>fast</code>, the journal protects
		  against MarkLogic Server process failures but not
		  against host operating system kernel failures or host
		  hardware failures.  When set to <code>off</code>, the
		  journal does not protect against MarkLogic Server
		  process failures, host operating system kernel
		  failures, or host hardware failures.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-journal-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the journal size setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-journal-size($config, xdmp:database("myDatabase"))
  (: returns the journal size setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-positions-list-max-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the positions list max size setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-positions-list-max-size($config, 
        xdmp:database("myDatabase"))
  (: returns the in positions list max size setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-merge-max-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the merge max size setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-max-size($config, xdmp:database("myDatabase"))
  (: returns the merge max size setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-merge-min-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the merge min size setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-min-size($config, xdmp:database("myDatabase"))
  (: returns the merge min size setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-merge-min-ratio" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the merge min ratio setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-min-ratio($config, xdmp:database("myDatabase"))
  (: returns the merge min ratio setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-merge-priority" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the CPU scheduler priority for merges
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-priority($config, xdmp:database("myDatabase"))
  (: returns the merge priority setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-merge-timestamp" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the merge timestamp setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-merge-timestamp($config, xdmp:database("myDatabase"))
  (: returns the merge timestamp setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-reindexer-throttle" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the reindexer throttle setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-reindexer-throttle($config, xdmp:database("myDatabase"))
  (: returns the reindexer throttle setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-included-element" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs an included element specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI.  Specify an empty string if the 
	      element is in no namespace.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
      <apidoc:param name="weight" type="xs:double">
	      The query weight to use in relavance calculations.
      </apidoc:param>
      <apidoc:param name="attribute-namespace" type="xs:string?">
	      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.
      </apidoc:param>
      <apidoc:param name="attribute-localname" type="xs:string">
	      The local name of the attribute to constrain on. Specify an
	      empty string if there is no attribute to constrain on.
      </apidoc:param>
      <apidoc:param name="attribute-value" type="xs:string">
	      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.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:included-element)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-excluded-element" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs an excluded element specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="namespace" type="xs:string?">
	      The namespace URI. Specify an empty string if the 
	      element is in no namespace.
      </apidoc:param>
      <apidoc:param name="localname" type="xs:string">
	      The local name for the node.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:excluded-element)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:database-excluded-element("http://myuri/namespace", 
	"element-name")
  (: the constructed element :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-field" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function constructs a field specification.
	  </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
      <apidoc:param name="include-root" type="xs:boolean">
	      A boolean value, true to start including at the root, false 
	      to not include until an included element is reached.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:field)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  admin:database-field("myField", fn:true() )
  (: the constructed element :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-included-elements" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the word query included elements setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:included-element)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-included-elements($config, 
        xdmp:database("myDatabase"))
  (: returns the included elements specifications from the configuration :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-excluded-elements" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the word query excluded elements setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:excluded-element)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-excluded-elements($config, 
        xdmp:database("myDatabase"))
  (: returns the excluded elements specifications from the configuration :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-fields" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fields specification(s)
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:field)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fields($config, xdmp:database("myDatabase"))
  (: returns the field settings :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-included-elements" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the fields included elements 
		  specification for the specified database from the 
		  configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:included-element)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-included-elements($config, 
      xdmp:database("myDatabase"), "myField")
  (: returns the field settings :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-excluded-elements" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the field excluded elements
		  specification
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:excluded-element)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-excluded-elements($config, 
      xdmp:database("myDatabase"), "myField")
  (: returns the field settings :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the field specification
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:field)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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($config, 
      xdmp:database("myDatabase"), "myField")
  (: returns the field settings :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-field" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds the field specification to the specified 
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="fields" type="element(db:field)*">
	      The field specification, typically the result of
	      an <code>admin:database-field</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-field("myField", fn:true() )
  return
  admin:database-add-field($config, $dbid, $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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-field" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes the field specification in the specified 
		  database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-names" type="xs:string*">
	      The name(s) of the field(s) to delete.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:database-delete-field($config, $dbid, "myField")
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-word-query-included-element" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds the word query included
		  element specification to the specified 
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="included-elements" 
	      type="element(db:included-element)*">
	      The included elements specification, typically the result of 
	      an <code>admin:database-included-element</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-word-query-included-element" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes the word query included
		  element specification in the specified 
		  database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="included-elements" 
	      type="element(db:included-element)*">
	      The included elements specification, typically the result of 
	      an <code>admin:database-included-element</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-field-included-element" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds the field included
		  element specification tn the specified 
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
      <apidoc:param name="included-elements" 
	      type="element(db:included-element)*">
	      The included elements specification, typically the result of 
	      an <code>admin:database-included-element</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-field-included-element" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes the field included
		  element specification in the specified 
		  database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
      <apidoc:param name="included-elements" 
	      type="element(db:included-element)*">
	      The included elements specification, typically the result of 
	      an <code>admin:database-included-element</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-word-query-excluded-element" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds the word query excluded
		  element specification for the specified 
		  database to the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="excluded-elements" 
	      type="element(db:excluded-element)*">
	      The excluded elements specification, typically the result of 
	      an <code>admin:database-excluded-element</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-excluded-element("http://myuri/namespace", 
	"element-name")
  return
  admin:database-add-word-query-excluded-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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-word-query-excluded-element" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes the word query excluded
		  element specification in the specified 
		  database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="excluded-elements" 
	      type="element(db:excluded-element)*">
	      The excluded elements specification, typically the result of 
	      an <code>admin:database-excluded-element</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-excluded-element("http://myuri/namespace", 
	"element-name")
  return
  admin:database-delete-word-query-excluded-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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-add-field-excluded-element" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function adds the field excluded
		  element specification in the specified 
		  database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
      <apidoc:param name="excluded-elements" 
	      type="element(db:excluded-element)*">
	      The excluded elements specification, typically the result of 
	      an <code>admin:database-excluded-element</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-field-excluded-element" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function deletes the field excluded
		  element specification in the specified 
		  database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
      <apidoc:param name="excluded-elements" 
	      type="element(db:excluded-element)*">
	      The excluded elements specification, typically the result of 
	      an <code>admin:database-excluded-element</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="database-get-field-word-lexicons" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function returns the word lexicons 
      specification(s)
      for the specified database from the configuration.
    </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
        The id of the database (for example, 
        <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
       The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(db:word-lexicon)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-lexicons($config, xdmp:database("myDatabase"),
    "myField")
  (: returns the word lexicon specifications for the database's field :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="database-add-field-word-lexicon" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function adds a word lexicon to the 
      specified database in the configuration.
    </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
        The id of the database (for example, 
        <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
       The name of the field.
      </apidoc:param>
      <apidoc:param name="word-lexicons" type="element(db:word-lexicon)*">
  A word lexicon specification, typically the result of an
  <code>admin:database-word-lexicon</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-lexicon("http://marklogic.com/collation/")
  return
  admin:database-add-field-word-lexicon($config, $dbid, "myField", $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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-delete-field-word-lexicon" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
    <apidoc:summary>
      This function deletes a word lexicon for the 
      specified database from the configuration.
    </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
        The id of the database (for example, 
        <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
       The name of the field.
      </apidoc:param>
      <apidoc:param name="word-lexicons" type="element(db:word-lexicon)*">
  A word lexicon specification, typically the result of an
  <code>admin:database-word-lexicon</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-lexicon("http://marklogic.com/collation/")
  return
  admin:database-delete-field-word-lexicon($config, $dbid, "myField", $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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="database-get-word-query-include-document-root" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the word query include
		  document root setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-include-document-root($config, 
        xdmp:database("myDatabase"))
  (: returns the word query include document root setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-stemmed-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the reindexer word query stemmed 
		  searches setting for the specified database from the 
		  configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-stemmed-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query stemmed searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-word-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query searches setting
		  for the specified database is enabled in the configuration.  
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-word searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query word searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-fast-phrase-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query fast phrase
		  searches setting
		  for the specified database is set in the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-fast-phrase-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query fast phrase searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-fast-case-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query fast case
		  sensitive searches setting is enabled
		  for the specified database in the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <apidoc:param name="config" type="element(configuration)">
		    A configuration specification, typically as returned 
		    from one of the Admin module functions.
		    An empty return value means the option is not set (false).
	    </apidoc:param>
      <apidoc:param name="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-fast-case-sensitive-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query fast case sensitive searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function 
	  name="database-get-word-query-fast-diacritic-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query fast diacritic 
		  sensitive searches setting is enabled
		  for the specified database in the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-fast-diacritic-sensitive-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query fast iacritic sensitive searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-trailing-wildcard-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query trailing
		  wildcard searches setting is enabled
		  for the specified database in the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-trailing-wildcard-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query trailing wildcard searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function 
	  name="database-get-word-query-trailing-wildcard-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query trailing 
		  wildcard word positions setting is enabled
		  for the specified database in the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-trailing-wildcard-word-positions($config, 
        xdmp:database("myDatabase"))
  (: returns the word query trailing wildcard word positions setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-three-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query three character
		  searches setting is enabled
		  for the specified database in the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-three-character-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query three character searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-three-character-word-positions" 
    lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query three character
		  word positions setting is enabled
		  for the specified database from the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-three-character-word-positions($config, 
        xdmp:database("myDatabase"))
  (: returns the word query three character word positions setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-two-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query two character
		  searches setting is enabled
		  for the specified database in the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-two-character-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query two character searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-word-query-one-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word query one character
		  searches setting is enabled
		  for the specified database in the configuration.
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-one-character-searches($config, 
        xdmp:database("myDatabase"))
  (: returns the word query one character searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-stemmed-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query stemmed searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string?">
        The new stemmed search value.  Must be one of
        <code>basic</code>, <code>advanced</code>,
        or <code>decompounding</code>. It must be equal to or greater
        than the database setting. The empty sequence turns this
        setting off for word query.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-stemmed-searches($config, 
        xdmp:database("myDatabase"), "advanced")
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-word-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query word searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-word-searches($config, 
               xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-fast-phrase-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query fast phrase
		  searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-fast-phrase-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-fast-case-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the word query fast case
		  sensitive searches setting
		  for the specified database from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-fast-case-sensitive-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function 
	  name="database-set-word-query-fast-diacritic-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query fast diacritic 
		  sensitive searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-fast-diacritic-sensitive-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-trailing-wildcard-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query trailing
		  wildcard searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-trailing-wildcard-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function 
	  name="database-set-word-query-trailing-wildcard-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query trailing wildcard 
		  word positions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-trailing-wildcard-word-positions($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-three-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query three character
		  searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-three-character-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function 
	  name="database-set-word-query-three-character-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query three character
		  word positions setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-three-character-word-positions($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-two-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query two character
		  searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-two-character-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-one-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query one character
		  searches setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-one-character-searches($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-word-query-include-document-root" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the word query include
		  document root setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-query-include-document-root($config, 
        xdmp:database("myDatabase"), 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-include-document-root" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns the field include document root setting
		  for the specified field from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-include-document-root($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-stemmed-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns stemmed searches setting
      for the specified field if configured. Otherwise, it returns the 
      empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-stemmed-searches($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the word query stemmed searches setting :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-word-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the word searches setting
		  for the specified field is enabled. Otherwise, it returns the 
		  empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-word-searches($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-fast-phrase-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns true if the fast phrase searches setting
      for the specified field is enabled. Otherwise, it returns the 
      empty sequence. 
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-phrase-searches($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-fast-case-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns true if the fast case sensitive searches setting
      for the specified field is enabled. Otherwise, it returns the 
      empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-case-sensitive-searches($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-fast-diacritic-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function returns true if the fast diacritic sensitive 
		  searches setting for the specified field is enabled. 
		  Otherwise, it returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-fast-diacritic-sensitive-searches($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-trailing-wildcard-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns true if the trailing wildcard searches setting
      for the specified field is enabled. Otherwise, it returns the 
      empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-trailing-wildcard-searches($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-trailing-wildcard-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns true if the trailing wildcard word positions setting
      for the specified field is enabled. Otherwise, it returns the 
      empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-wildcard-word-positions($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-three-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns true if the three character searches setting
      for the specified field is enabled. Otherwise, it returns the 
      empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-three-character-searches($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-three-character-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns true if the three character word positions setting
      for the specified field is enabled. Otherwise, it returns the 
      empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-three-character-word-positions($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-two-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns true if the two character searches setting
      for the specified field is enabled. Otherwise, it returns the 
      empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-get-field-one-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
      This function returns true if the one character searches setting
      for the specified field is enabled. Otherwise, it returns the 
      empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean?</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-one-character-searches($config, 
        xdmp:database("myDatabase"), "myField")
  (: returns the setting :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-stemmed-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field stemmed searches setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
      <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:string?">
	      The new stemmed search value.  Must be one of
	      <code>basic</code>, <code>advanced</code>,
	      or <code>decompounding</code>. It must be equal to or greater
        than the database setting. The empty sequence turns this
        setting off for the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-word-searches" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field word searches setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-fast-phrase-searches" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field fast phrase searches setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-fast-case-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field fast case sensitive
		  searches setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-fast-diacritic-sensitive-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field fast diacritic sensitive
		  searches setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-trailing-wildcard-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field trailing wildcard 
		  searches setting
		  for the specified database in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-trailing-wildcard-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field trailing wildcard word
		  positions setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-three-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field three character searches 
		  setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-three-character-word-positions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field three character
		  word positions setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-two-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field two character searches setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-one-character-searches" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field one character searches setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean?">
        A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code>
        or the empty sequence to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-include-document-root" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field include document root setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	      The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
	      A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-set-field-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
	  <apidoc:summary>
		  This function sets the field name setting
		  for the specified field in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="field-name" type="xs:string">
	     The name of the field.
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new name for the field.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-name($config, 
        xdmp:database("myDatabase"), "myField", "myNewFieldName")
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-get-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function returns the name of the specified forest,
		  given the forest ID.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  If the ID does not correspond to 
		    a valid forest ID, then an exception is thrown. 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:forest-get-name(admin:get-configuration(), 18220031759147104956)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-get-host" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function returns the ID of the host in which the
		  specified forest resides.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:forest-get-host(admin:get-configuration(), xdmp:forest("myForest"))

  => the ID of the host that services the forest named "myForest"
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-get-id" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function returns the ID of the forest with the specified
		  name, from the specified configuration.  The difference 
		  between this function and <code>xdmp:forest()</code> is that
		  the ID from this function can come from a forest that has not
		  yet been saved (that is, from a forest that has been created
		  in the same query with the Admin library but has not yet 
		  been saved to the cluster configuration files).
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-name" type="xs:string">
		    The name of the forest.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:forest-get-id(admin:get-configuration(), "myForest")
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-get-enabled" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function returns the enabled state of the specified 
		  forest.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-enabled($config, admin:forest-get-id($config, "test")) 		  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-get-data-directory" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function returns the name of the data directory of the
		  specified forest.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-data-directory($config, 
         admin:forest-get-id($config, "test"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-get-failover-enable" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function returns the state of whether failover is
      enabled for the specified forest.
    </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
        The ID of the forest.  For example, 
        <code>xdmp:forest("myForest")</code> specified the ID 
        for a  forest named "myForest". 
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-failover-enable($config, 
         admin:forest-get-id($config, "test"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-get-updates-allowed" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function returns the state of what kinds of updates are allowed
      for the specified forest.
    </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
        The ID of the forest.  For example, 
        <code>xdmp:forest("myForest")</code> specified the ID 
        for a  forest named "myForest". 
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-updates-allowed($config, 
         admin:forest-get-id($config, "test"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-get-failover-hosts" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function returns the IDs of the hosts defined 
		  as failover hosts for this forest.  The order in which the
		  hosts IDs are returned is significant, with the first ID
		  being the primary host, the second (if there is one) being
		  the secondary, and so on.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-failover-hosts($config, 
         admin:forest-get-id($config, "test"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-set-host" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function sets a forest configuration to a new
		  host.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedLong">
		    The host ID of the new host.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-host($config, admin:forest-get-id($config, "Documents"), 
              xdmp:host("myNewHost"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-set-enabled" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function sets the enabled state for a forest 
		  configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    The new state of the forest, for example 
		    <code>fn:true()</code> for enabled, 
		    <code>fn:false()</code> for disabled. 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-enabled($config, admin:forest-get-id($config, "Documents"), 
      fn:false())
    
  => sets the forest named "Documents" to the disabled state
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-set-failover-enable" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function sets the forest failover enabled state for a
      forest configuration.
    </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
        The ID of the forest.  For example, 
        <code>xdmp:forest("myForest")</code> specified the ID 
        for a  forest named "myForest". 
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
        The new failover-enable state of the forest, for example 
        <code>fn:true()</code> for enabled, 
        <code>fn:false()</code> for disabled.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-failover-enable($config, 
      admin:forest-get-id($config, "Documents"), 
      fn:true())
    
      => sets the failover state of the forest named "Documents" to 
         the enabled state
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-set-updates-allowed" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function sets the updates-allowed state for a
      forest configuration.
    </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
        The ID of the forest.  For example, 
        <code>xdmp:forest("myForest")</code> specified the ID 
        for a  forest named "myForest". 
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
        The new updates-allowed state of the forest. Must be one of
        <code>all</code> for all updates allowed, 
        <code>delete-only</code> for only deletes allowed,
        <code>read-only</code> for no updates allowed and to cause
        updating transactions to abort immediately,
        <code>flash-backup</code> for no updates allowed and to make
        updating transactions retry for a time period specified in 
        the group's retry timeout.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-add-failover-host" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function adds a failover host to the list of failover
		  hosts for the specified forest in the specified 
		  configuration.  If there are already any hosts specified,
		  this host is added to the end of the list of failover hosts.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
	    <apidoc:param name="hosts" type="xs:unsignedLong*">
		   The host ID(s) for the host(s) you want to restart.
		   For example, <code>xdmp:host()</code> returns the ID for
		   the current host. 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-add-failover-host($config, 
      admin:forest-get-id($config, "Documents"), 
      xdmp:host("myFailoverHost"))
    
      => add the failover host "myFailoverHost" to the end of the  
         list of failover hosts

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-delete-failover-host" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function deletes the specified failover host(s) from the
		  failover-host list in the specified configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
	    <apidoc:param name="hosts" type="xs:unsignedLong*">
		   The host ID(s) for the host(s) you want to delete.
		   For example, <code>xdmp:host()</code> returns the ID for
		   the current host. 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-failover-host($config, 
      admin:forest-get-id($config, "Documents"), 
      xdmp:host("myFailoverHost"))
    
      => deletes the failover host "myFailoverHost" from the  
         list of failover hosts

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-delete" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function deletes the configuration for the specified
		  forest from the configuration.  
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-ids" type="xs:unsignedLong*">
		    One or more forest ids.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
	    <apidoc:param name="delete-data" type="xs:boolean">
		    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.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
     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. 
    </apidoc:usage>    
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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"

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-create" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc:summary>
		  This function creates a new forest configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-name" type="xs:string">
		    The name of the forest.  The must be unique for all
		    forests in the cluster.
	    </apidoc:param>
	    <apidoc:param name="host-id" type="xs:unsignedLong">
		    The ID of the host (for example, <code>xdmp:host()</code>
		    for the current host.
	    </apidoc:param>
      <apidoc:param name="data-directory" type="xs:string?">
        The optional data directory of the forest. If no directory
        is specified, then it will be a private forest.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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(), ())

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-copy" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
	  <apidoc: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.
	  </apidoc:summary>
    <apidoc:params>
            <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="forest-id" type="xs:unsignedLong">
		    The ID of the forest.  For example, 
		    <code>xdmp:forest("myForest")</code> specified the ID 
		    for a  forest named "myForest". 
	    </apidoc:param>
      <apidoc:param name="forest-name" type="xs:string">
        The name for the new forest.
      </apidoc:param>
      <apidoc:param name="data-directory" type="xs:string?">
        The optional data directory of the forest. If no directory
        is specified, then it will be a private forest.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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",())

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="forest-get-backups" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function returns the scheduled backups
      for the specified forest from the configuration.
    </apidoc:summary>
    <apidoc:params>
      <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="forest-id" type="xs:unsignedLong">
        The id of the forest (for example, 
        <code>xdmp:forest("myforest")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(as:forest-backup)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-backups($config, xdmp:forest("myforest") )
  (: returns the scheduled backups for the forest :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="forest-weekly-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function constructs a weekly scheduled backup.
    </apidoc:summary>
    <apidoc:params>       
      <apidoc:param name="backup-dir" type="xs:string">
        The directory where the backup will be saved to.
      </apidoc:param>
      <apidoc:param name="backup-period" type="xs:positiveInteger">
        The how many weeks between each backup.
      </apidoc:param>
      <apidoc:param name="days" type="xs:string+">
        The day(s) of the week.  Must be a sequence of zero
        or more of <code>monday</code>, <code>tuesday</code>, 
        <code>wednesday</code>, <code>thusday</code>,
        <code>friday</code>, <code>saturday</code>,
        <code>sunday</code>.
      </apidoc:param>
      <apidoc:param name="start-time" type="xs:time">
        A time for the scheduled backup to start.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(as:forest-backup)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="forest-monthly-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function constructs a monthly scheduled backup.
    </apidoc:summary>
    <apidoc:params>       
      <apidoc:param name="backup-dir" type="xs:string">
        The directory where the backup will be saved to.
      </apidoc:param>
      <apidoc:param name="backup-period" type="xs:positiveInteger">
        The number of months to elapse between each backup.
      </apidoc:param>
      <apidoc:param name="backup-month-day" type="xs:unsignedInt">
        The day of the month the backup will happen (between 1 and 31)
      </apidoc:param>
      <apidoc:param name="start-time" type="xs:time">
        A time for the scheduled backup to start.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(as:forest-backup)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  admin:forest-monthly-backup("/backup-dir", 1, 1, xs:time("09:45:00"))
  (: returns the monthly backup specification :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="forest-one-time-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function constructs a one-time backup.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="backup-dir" type="xs:string">
        The directory where the backup will be saved to.
      </apidoc:param>
      <apidoc:param name="start" type="xs:dateTime">
        The starting dateTime of the scheduled backup.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(as:forest-backup)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  admin:forest-one-time-backup("/backup-dir",  
        xs:dateTime("2008-02-14T09:45:00"))
  (: returns the one-time backup :)
  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-add-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function adds scheduled backup specifications for a 
      forest to a configuration. 
    </apidoc:summary>
    <apidoc:params>
      <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="forest-id" type="xs:unsignedLong">
        The id of the forest (for example, 
        <code>xdmp:forest("myforest")</code>).
      </apidoc:param>
      <apidoc:param name="backups" type="element(as:forest-backup)*">
        The scheduled backup specification(s), typically the result of
        an <code>admin:forest-one-time-backup</code> or 
        an <code>admin:forest-monthly-backup</code> or
        an <code>admin:forest-weekly-backup</code> call
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $forest := xdmp:forest("myforest")
  let $backup := admin:forest-one-time-backup("/backup-dir",  
        xs:dateTime("2008-02-14T09:45:00"))
  return
  admin:forest-add-backup($config, $forest, $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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-delete-backup" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
    <apidoc:summary>
      This function deletes scheduled backup specifications for a 
      forest from a configuration. 
    </apidoc:summary>
    <apidoc:params>
      <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="forest-id" type="xs:unsignedLong">
        The id of the forest (for example, 
        <code>xdmp:forest("myforest")</code>).
      </apidoc:param>
      <apidoc:param name="backups" type="element(as:forest-backup)*">
        The scheduled backup(s) to delete. Typically, the result of
        an <code>admin:forest-get-backups</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config  := admin:get-configuration()
  let $forest  := xdmp:forest("Documents")
  let $backups := admin:forest-get-backups($config, $forest)[1 to 3]
  return
  admin:forest-delete-backup($config, $forest, $backups)
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
    
  <apidoc:function name="host-get-id" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
	  <apidoc:summary>
		  This function return the ID for the specified host from 
		  the configuration.
		  The difference between this function and <code>xdmp:host()</code> 
		  is that the ID from 
		  this function can come from a host that has not yet been saved (that is, 
		  from a host 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 host without the 
		  need to first save the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="host-name" type="xs:string">
		    The name of the host.  If the host is the current host,
		    <code>xdmp:host-name()</code> returns the name.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:host-get-id($config, xdmp:host-name())
  (: returns the host ID :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="host-get-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
	  <apidoc:summary>
		  This function returns the name for the host with the 
		  specified ID.
	  </apidoc:summary>
    <apidoc:params>
            <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="host-id" type="xs:unsignedLong">
		    The host ID. Typically, the result of an 
		    <code>admin:host-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:host-get-name($config, admin:host-get-id($config, xdmp:host-name()))
  (: returns the host name :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="host-get-group" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
	  <apidoc:summary>
		  This function returns the group ID for the host with the 
		  specified ID.
	  </apidoc:summary>
    <apidoc:params>
            <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="host-id" type="xs:unsignedLong">
		    The host ID. Typically, the result of an 
		    <code>admin:host-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:host-get-group($config, admin:host-get-id($config, xdmp:host-name()))
  (: returns the group ID :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="host-get-port" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
	  <apidoc:summary>
		  This function returns the bind port for the host with the 
		  specified ID.
	  </apidoc:summary>
    <apidoc:params>
            <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="host-id" type="xs:unsignedLong">
		    The host ID. Typically, the result of an 
		    <code>admin:host-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:host-get-port($config, admin:host-get-id($config, xdmp:host-name()))
  (: returns the bind port for the host :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="host-set-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
	  <apidoc:summary>
		  This function changes the name of an existing host
		  to the newly specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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="host-id" type="xs:unsignedLong">
		    The host ID. Typically, the result of an 
		    <code>admin:host-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new name of the host.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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, "myOldHostname")
  return
  admin:host-set-name($config, $hostid, "myNewHostName")
  (: 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.  :)  
 
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="host-set-group" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
	  <apidoc:summary>
		  This function changes the group to which an existing host
		  belongs to the newly specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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="host-id" type="xs:unsignedLong">
		    The host ID. Typically, the result of an 
		    <code>admin:host-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedLong">
		    The new group ID value (typically from a 
		    <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
	   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. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="host-set-port" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
	  <apidoc:summary>
		  This function changes the bind port value for the host
		  to the newly specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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="host-id" type="xs:unsignedLong">
		    The host ID. Typically, the result of an 
		    <code>admin:host-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new bind port value.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-port($config, $hostid, 7999)
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-type" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the type of appserver with the
      specified ID. It will be either "http", "xdbc", or "WebDAV".
    </apidoc:summary>
    <apidoc:params>
      <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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" :)            
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-group-id" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the ID of the specified 
      App Server's group.
    </apidoc:summary>
    <apidoc:params>
      <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:appserver-get-group-id($config, admin:appserver-get-id($config, (), 
    "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-host-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the ID(s) of the hosts the specified 
      App Server's is currently running on.
    </apidoc:summary>
    <apidoc:params>
      <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:appserver-get-host-ids($config, admin:appserver-get-id($config, (), 
    "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-id" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the ID of the specified App Server.
		  The difference between this function and <code>xdmp:server()</code> is 
		  that the ID from 
		  this function can come from an appserver that has not yet been saved (that is, 
		  from an appserver 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 appserver without the 
		  need to first save the configuration.
	  </apidoc:summary>
    <apidoc:params>
      <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-ids" type="xs:unsignedLong*">
         The optional group-ids in which to restrict the appserver ids
         returned. If no group-id is specified, this function will 
         return all matching appservers across all groups.
      </apidoc:param>
      <apidoc:param name="appserver-name" type="xs:string">
         The name of the App Server.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:appserver-get-id($config, admin:group-get-id($config, "Default"),
         "myAppServer")

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the name of the appserver with the
		  specified ID.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-name($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-root" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the root for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		The ID of the App Server.   Typically, this is the result
                of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-root($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-port" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the port for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-port($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-modules-database" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the ID of the database set as the
		  modules database for the specified database.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:usage>
	    <p>This function throws an exception if the specified App Server 
		    is a WebDAV server (because WebDAV servers do not use a
		    modules database).</p>
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-modules-database($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-database" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the ID of the database to which the
      App Server is set to execute queries against for the 
      specified database.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-database($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-last-login" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the ID of the database to which the
      App Server stores users' last login information.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-last-login($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-display-last-login" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the value of the whether or not the
      appserver should display users' last login information.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-display-last-login($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-address" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the IP address of the App Server
		  configuration. The default is <code>0.0.0.0</code>.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-address($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-backlog" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the socket listen backlog setting 
		  for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-backlog($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-threads" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the maximum number of threads 
		  configured for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-threads($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-request-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the request timeout value configured
		  for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-request-timeout($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-keep-alive-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the keep alive timeout value
		  configured for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-keep-alive-timeout($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-session-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the session timeout value
		  configured for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-session-timeout($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-default-time-limit" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the default time limit value configured
      for the specified App Server.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-default-time-limit($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-max-time-limit" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the max time limit value configured
      for the specified App Server.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-max-time-limit($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-pre-commit-trigger-depth" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the pre commit trigger depth value
		  configured for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-pre-commit-trigger-depth($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-pre-commit-trigger-limit" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the pre commit trigger limit value
		  configured for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-pre-commit-trigger-limit($config,  
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-collation" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the collation URI set in the 
		  configuration for the specified App Server. 
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-collation($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-authentication" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the authentication scheme
		  (basic, digest, digestbasic, or application-level) 
		  configured for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-default-user" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the default user value configured
		  for the specified App Server.  The default user only is 
		  used with application-level authentication.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-default-user($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-privilege" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the privilege ID for the 
		  specified App Server.  If no privilege is configured, 
		  It returns 0.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-privilege($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-concurrent-request-limit" lib="admin"
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the concurrent request limit for 
      any user for the specified App Server. 0 indicates no bound 
      on the number of concurrent requests.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-concurrent-request-limit($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-log-errors" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value of the log errors setting
		  configured for this App Server, where true indicates that
		  the App Server will send uncaught exceptions to the 
		  <code>ErrorLog.txt</code> file, and false indicates that
		  it will not.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-log-errors($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-debug-allow" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value of debug allow  setting
		  configured for this App Server, where true indicates that
		  the App Server will allow queries to be debugged, and false 
		  indicates that it will not.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-debug-allow($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-profile-allow" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value of the profile allow setting
		  configured for this App Server, where true indicates that
		  the App Server will allow queries to be profiled, and false 
		  indicates that it will not.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-profile-allow($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-default-xquery-version" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value of the default xquery
		  version configured for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-default-xquery-version($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-output-sgml-character-entities" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value for the
		  output sgml character entities setting for the 
		  specified App Server. 
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-output-sgml-character-entities($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-output-encoding" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value for the output encoding
		  setting for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-output-encoding($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-error-handler" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the path to the error handler 
		  configured for this App Server.  If no error handler
		  is configured, returns the empty string.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-error-handler($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-url-rewriter" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the path to the URL rewriter 
		  configured for this App Server.  If no URL rewriter
		  is configured, returns the empty string.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-url-rewriter($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-enabled" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the enabled state for the specified
		  App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-enabled($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-schemas" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value of any schemas definitions
		  predefined for the specified App Server.  If none are defined,
		  returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:schema)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-schemas($config, 
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-get-namespaces" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value of any namespace definitions
		  predefined for the specified App Server.  If none are defined,
		  returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:namespace)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-namespaces($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))


  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-static-expires" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the value of the "expires" HTTP header for static content 
      to expire after this many seconds port for the specified App Server.
    </apidoc:summary>
    <apidoc:params>
      <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-static-expires($config,
             admin:appserver-get-id($config, $groupid, "myAppServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-compute-content-length" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the value of whether the WebDAV server
      computes content length.
    </apidoc:summary>
    <apidoc:params>
      <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-compute-content-length($config,
             admin:appserver-get-id($config, $groupid, "myWebDAVServer"))

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-set-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function changes the name of an existing App Server
		  to the newly specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new name for the specified App Server.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-name($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "myNewAppServerName")
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-root" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function changes the root for a specified App Server
		  to the newly specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new value for the root.  The root must be either a 
		    fully qualified path (for example, 
		    <code>/space/myRoot</code> or <code>c:/space/myRoot</code>)
		    or a relative path (for example, <code>myRoot</code>); 
		    relative paths are resolved relative to the directory in
		    which MarkLogic Server is installed.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-port" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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 
		  <code>admin:save-configuration</code> to save the 
		  configuration, it will automatically restart 
		  MarkLogic Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new port number.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-modules-database" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value in the configuration of
		  modules database for the specified App Server to the
		  specified database ID.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="item()">
		    The database ID for the database to set as the modules
		    database. To specify the filesystem, use 0 or "file-system"
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
	   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. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-database" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function sets the value in the configuration of
      the database for the specified App Server.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedLong">
        The database ID for the database to set as the
        database for the specified App Server.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
	   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. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-last-login" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc: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.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedLong?">
        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
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
     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. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-set-display-last-login" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function sets the display last login setting in the 
      configuration for the specified App Server.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
        A boolean value specifying whether to indicate if the
        appserver should display last login information.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-display-last-login($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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-set-address" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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 
		  <code>admin:save-configuration</code> to save the 
		  configuration, it will automatically restart 
		  MarkLogic Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new value for the IP address for the specified App 
		    Server.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-backlog" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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 
		  <code>admin:save-configuration</code> to save the 
		  configuration, it will automatically restart 
		  MarkLogic Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new integer value for the backlog.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-threads" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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 
		  <code>admin:save-configuration</code> to save the 
		  configuration, it will automatically restart 
		  MarkLogic Server.
	  </apidoc:summary>    
	<apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new integer value for the number of threads.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-request-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value of the socket request 
		  timeout (the number of seconds before the socket times
		  out) in the configuration for the specified App Server. 
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    An integer specifying the number of seconds before a
		    socket request times out.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-request-timeout($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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-keep-alive-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the keep-alive timeout (the maximum 
		  number of second for subsequent socket requests to time
		  out) in the configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new integer timeout value (specifies the number 
		    of seconds).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-keep-alive-timeout($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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-session-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the session timeout value (in seconds)
		  in the configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new integer timeout value (specifies the number 
		    of seconds).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-session-timeout($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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-default-time-limit" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function sets the default time limit (the maximum total amount
      of time to service a request before the App Server throws a
      timeout exception) in the configuration for the specified 
      App Server.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
        The new integer timeout value (specifies the number 
        of seconds).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-time-limit($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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-max-time-limit" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function sets the max time limit (the maximum total amount
      of time to service a request before the App Server throws a
      timeout exception) in the configuration for the specified 
      App Server.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
        The new integer timeout value (specifies the number 
        of seconds).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-max-time-limit($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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-pre-commit-trigger-depth" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    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.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-pre-commit-trigger-limit" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value in the configuration
		  for the maximum number of
		  pre-commit triggers a single statement can invoke 
		  for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The limit for the number of pre-commit triggers
		    a single statement can invoke.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-limit($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         1000)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-collation" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the default collation in the 
		  configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    A valid collation URI (for example, 
		    <code>http://marklogic.com/collation/</code>).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-authentication" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" 
	  subcategory="appserver">
	  <apidoc:summary>
		  This function sets the authentication scheme in the 
		  configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The authentication scheme (<code>basic</code>, 
		    <code>digest</code>, <code>digestbasic</code>,
		    or <code>application-level</code>). 
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-default-user" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the default user (for use with 
		  application-level authentication) in the configuration
		  for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedLong">
		    The user ID of the user to set as the default user.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-privilege" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedLong">
        The privilege ID of an execute privilege needed to
        access this App Server.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-concurrent-request-limit" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function sets the limit on concurrent requests that
      any user may have on a particular appserver. Setting the
      limit to 0 indicates there is no bound on the number of
      concurrent requests.
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
        The limit of concurrent requests.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-concurrent-request-limit($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         15)
  (: 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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-log-errors" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the log errors setting in the 
		  configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    A boolean value specifying whether to allow send
		    uncaught exceptions on this App Server  to the 
		    <code>ErrorLog.txt</code> file (true) or not (false).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-log-errors($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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-debug-allow" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the debug allow setting in the 
		  configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    A boolean value specifying whether to allow debugging
		    on this App Server (true) or not (false).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-debug-allow($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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-profile-allow" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the profile allow setting in the 
		  configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    A boolean value specifying whether to allow profiling
		    on this App Server (true) or not (false).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-profile-allow($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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-default-xquery-version" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The default XQuery version value, one of 
		    <code>1.0-ml</code>, <code>1.0</code>, or
		    <code>0.9-ml</code>.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-output-sgml-character-entities" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The default value for outputting SGML entities, one of 
		    <code>none</code>, <code>default</code>,  
		    <code>math</code>, or <code>pub</code>.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-output-encoding" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value for the default output encoding
		  in the configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The default value for outputting characters.  The value
		    must be the name of a valid character set (for example, 
		    <code>UTF-8</code>, <code>ASCII</code>, and so on.  
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-error-handler" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value of the path to the error
		  handler in the configuration for the specified App Server.
		  The path should specify a relative or absolute path to
		  an XQuery module that is executed in the event of any
		  400 or 500 series HTTP errors (sometime known as a 
		  "sorry" server to give the user a clean error page).
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The path to the XQuery main module to execute when 
		    400 or 500 series errors occur on the App Server.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-error-handler($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "sorry.xqy")
  (: 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.  :);

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-url-rewriter" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value of the path to the URL
		  rewriter in the configuration for the specified App Server.
		  The path should specify a relative or absolute path to
		  an XQuery module that is executed to rewrite incoming URLs.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The path to the XQuery main module to execute
                    to rewrite URLs.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy"  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-url-rewriter($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         "rewriter.xqy")
  (: 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.  :);

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-set-enabled" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the enabled state in the configuration
		  for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    The enabled state of the App Server to set, true for
		    enabled and false for disabled.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-set-static-expires" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function changes the value of the "expires" HTTP header for a specified App Server
      to the newly specified value.
    </apidoc:summary>
    <apidoc:params>
      <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
        The new value for the "expires" header.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-static-expires($config, 
         admin:appserver-get-id($config, $groupid, "myAppServer"),
         3600)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>

  <apidoc:function name="appserver-set-compute-content-length" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function changes the value whether a WebDAV server computes 
      content length. 
    </apidoc:summary>
    <apidoc:params>
      <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
        The new value for compute content length.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-compute-content-length($config, 
         admin:appserver-get-id($config, $groupid, "myWebDAVServer"),
         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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="appserver-get-request-blackouts" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function returns the request blackouts specification
      for the specified appserver from the configuration.
    </apidoc:summary>
    <apidoc:params>
      <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="appserver-id" type="xs:unsignedLong">
        The id of the appserver (for example, 
        <code>xdmp:server("myAppserver")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:request-blackout)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:appserver-get-request-blackouts($config, xdmp:server("myAppserver") )
  (: returns the request-blackouts specification for the appserver :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-recurring-request-blackout" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function constructs a request-blackout specification.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="users" type="xs:unsignedLong*">
        A sequence of user ID(s) that the request blackout applies too.
      </apidoc:param>
      <apidoc:param name="roles" type="xs:unsignedLong*">
        A sequence of role ID(s) that the request blackout applies too.
      </apidoc:param>
      <apidoc:param name="days" type="xs:string*">
        The day(s) of the week.  Must be a sequence of zero
        or more of <code>monday</code>, <code>tuesday</code>, 
        <code>wednesday</code>, <code>thusday</code>,
        <code>friday</code>, <code>saturday</code>,
        <code>sunday</code>.
      </apidoc:param>
      <apidoc:param name="start-time" type="xs:time?">
        A time for the request blackout to start.
      </apidoc:param>
      <apidoc:param name="end-time" type="xs:time?">
        A time for the request blackout to end.
      </apidoc:param>
      <apidoc:param name="duration" type="xs:duration?">
        The amount of time for the blackout to last.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:request-blackout)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-one-time-request-blackout" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function constructs a one-time request-blackout 
      specification.
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="users" type="xs:unsignedLong*">
        A sequence of user ID(s) that the request blackout applies too.
      </apidoc:param>
      <apidoc:param name="roles" type="xs:unsignedLong*">
        A sequence of role ID(s) that the request blackout applies too.
      </apidoc:param>
      <apidoc:param name="start" type="xs:dateTime">
        The starting dateTime of the request blackout.
      </apidoc:param>
      <apidoc:param name="end" type="xs:dateTime?">
        The ending dateTime of the request blackout.
      </apidoc:param>
      <apidoc:param name="duration" type="xs:duration?">
        The amount of time for the blackout to last.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:request-blackout)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  admin:appserver-one-time-request-blackout((),(),  
        xs:dateTime("2008-02-14T09:45:00"), 
        (), xs:dayTimeDuration("PT3H") )
  (: returns the one-time request-blackout specification :)
  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-add-request-blackout" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function adds a request blackout specification for a 
      appserver to a configuration. 
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The id of the appserver (for example, 
        <code>xdmp:server("myAppserver")</code>).
      </apidoc:param>
      <apidoc:param name="request-blackouts" type="element(gr:request-blackout)*">
        The request blackout specification(s), typically the result of
        an <code>admin:appserver-one-time-request-blackout</code> or 
        an <code>admin:appserver-recurring-request-blackout</code> call
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-delete-request-blackout" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
    <apidoc:summary>
      This function deletes a request blackout specification for a 
      appserver from a configuration. 
    </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
        The id of the appserver (for example, 
        <code>xdmp:server("myAppserver")</code>).
      </apidoc:param>
      <apidoc:param name="blackouts" type="element(gr:request-blackout)*">
        The request blackout(s) to delete. Typically, the result of
        an <code>admin:appserver-get-request-blackouts</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-request-blackouts($config, 
        $app-id )
  return
  admin:appserver-delete-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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-schema" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function constructs a schema element with the 
		  specified prefix and URI.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="namespace-uri" type="xs:string">
		    The namespace URI for the schema.
	    </apidoc:param>
	    <apidoc:param name="schema-location" type="xs:string">
		    The schema location.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:schema)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:group-schema("http://myuri/namespace", "/some/schema.xsd")
  (: the schema element :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-add-schema" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function adds a schema binding definition to the 
		  existing schema binding definitions in the configuration 
		  for the specified App Server.  Schemas with a schema binding
		  definition are automatically imported into queries run 
		  against the App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="schemas" type="element(gr:schema)*">
		    A list of schema specification elements of the form:
		    <pre xml:space="preserve"><![CDATA[
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
  <namespace-uri>foo</namespace-uri>
  <schema-location>/foo.xsd</schema-location>
</schema>
]]></pre>
              Typically the result of an <code>admin:group-schema</code> call.  
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-add-schema($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
  <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
     <namespace-uri>foo</namespace-uri>
     <schema-location>/foo.xsd</schema-location>
  </schema>)
  (: 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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-delete-schema" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function deletes a schema definition in the 
		  configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="schemas" type="element(gr:schema)*">
		    A list of schema specification elements of the form:
		    <pre xml:space="preserve"><![CDATA[
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
  <namespace-uri>foo</namespace-uri>
  <schema-location>/foo.xsd</schema-location>
</schema>
]]></pre>		    
             Typically the result of an <code>admin:group-schema</code> call.   
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-delete-schema($config,
         admin:appserver-get-id($config, $groupid, "myAppServer"),
  <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
     <namespace-uri>foo</namespace-uri>
     <schema-location>/foo.xsd</schema-location>
  </schema>)
  (: 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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-namespace" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function constructs a namespace element with the 
		  specified prefix and URI.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="prefix" type="xs:string">
		    The namespace prefix.
	    </apidoc:param>
	    <apidoc:param name="namespace-uri" type="xs:string">
		    The namespace URI.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:namespace)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:group-namespace("myprefix", "http://myuri/namespace")
  (: the namespace element :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-add-namespace" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  Add one or more namespaces to an App Server configuration, 
		  which will predefine the namespace(s) for all requests 
		  evaluated against the App Server.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="config" type="element(configuration)">
		    The configuration for the cluster, typically the result
		    of <code>admin:get-configuration()</code> call.
	    </apidoc:param>
	    <apidoc:param name="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="namespaces" type="element(gr:namespace)*">
		    <p>
			    A list of namespaces to add.  Each namespace 
			    specification has the following form:
		    </p>
		    <pre xml:space="preserve"><![CDATA[
  <namespace xmlns="http://marklogic.com/xdmp/group">
    <prefix>myprefix</prefix>
    <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
  </namespace>
	 ]]></pre>
         Typically the result of an <code>admin:group-namespace</code> call.   
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:appserver-add-namespace($config, 
    admin:appserver-get-id($config,(), "Docs"), 
    <namespace xmlns="http://marklogic.com/xdmp/group">
      <prefix>myprefix</prefix>
      <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
    </namespace>)

  => The XML for new configuration with this namespace added.  Use 
     this as the argument to admin:save-configuration to change 
     the configuration.
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-delete-namespace" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function deletes a namespace configuration from the
		  configuration for the specified App Server.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="namespaces" type="element(gr:namespace)*">
		    <p>
			    A list of namespaces to add.  Each namespace 
			    specification has the following form:
		    </p>
		    <pre xml:space="preserve"><![CDATA[
  <namespace xmlns="http://marklogic.com/xdmp/group">
    <prefix>myprefix</prefix>
    <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
  </namespace>
	 ]]></pre>
         Typically the result of an <code>admin:group-namespace</code> call.   
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-delete-namespace($config,
       admin:appserver-get-id($config, $groupid, "myAppServer"),
   <namespace xmlns="http://marklogic.com/xdmp/group">
     <prefix>myprefix</prefix>
     <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
   </namespace>)
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-delete" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function deletes one or more App Servers in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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="appserver-ids" type="xs:unsignedLong*">
		    The ID(s) of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:appserver-delete($config,
        admin:appserver-get-id($config, $groupid, "myAppServer") )
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="http-server-create" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function creates a  new HTTP App Server with the 
		  specified name, root, and port in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="appserver-name" type="xs:string">
		    The name of the App Server.  The name must be unique
                    among the App Server names for the group.
	    </apidoc:param>
	    <apidoc:param name="root" type="xs:string">
		    The root of the App Server.
	    </apidoc:param>
	    <apidoc:param name="port" type="xs:unsignedLong">
		    The port on which the App Server listens. The port must 
		    be available on the host.
	    </apidoc:param>
      <apidoc:param name="modules-id" type="item()">
       The id of the modules database (for example, 
       <code>xdmp:database("Modules")</code>). 
       To specify the filesystem, use 0 or "file-system"
      </apidoc:param>
      <apidoc:param name="database-id" type="xs:unsignedLong">
       The id of the database (for example, 
       <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
	   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. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="xdbc-server-create" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function creates a new XDBC App Server with the 
		  specified name, root, and port in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="appserver-name" type="xs:string">
		    The name of the App Server.  The name must be unique
                    among the App Server names for the group.
	    </apidoc:param>
	    <apidoc:param name="root" type="xs:string">
		    The path to the module directory root of this XDBC server.
	    </apidoc:param>
	    <apidoc:param name="port" type="xs:unsignedLong">
		    The port on which the App Server listens. The port must 
		    be available on the host.
	    </apidoc:param>
      <apidoc:param name="modules-id" type="item()">
       The id of the modules database (for example, 
       <code>xdmp:database("Modules")</code>). 
       To specify the filesystem, use 0 or "file-system"
      </apidoc:param>
      <apidoc:param name="database-id" type="xs:unsignedLong">
       The id of the database (for example, 
       <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
	   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. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="webdav-server-create" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function creates a new WebDAV App Server with the 
		  specified name, library, and port in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="appserver-name" type="xs:string">
		    The name of the App Server.  The name must be unique
                    among the App Server names for the group.
	    </apidoc:param>
	    <apidoc:param name="root" type="xs:string">
		    The root of the App Server.
	    </apidoc:param>
	    <apidoc:param name="port" type="xs:unsignedLong">
		    The port on which the App Server listens. The port must 
		    be available on the host.
	    </apidoc:param>
      <apidoc:param name="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
	   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. 
    </apidoc:usage>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="appserver-copy" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc: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.
	  </apidoc:summary>
          <apidoc:params>
          <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="appserver-id" type="xs:unsignedLong">
		    The ID of the App Server.   Typically, this is the result
		    of an <code>admin:appserver-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="target-group-id" type="xs:unsignedLong?">
		    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 <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="appserver-name" type="xs:string">
		    The new name for the App Server.
	    </apidoc:param>
	    <apidoc:param name="port" type="xs:unsignedLong">
		    The port number for the new App Server.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="taskserver-get-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the name of the task server for the
		  specified group from the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-name($config, $group-id)
  (: returns the name of the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-threads" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the number of threads configured 
		  on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-threads($config, $group-id)
  (: returns the number of threads configured on the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-debug-threads" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the number of debug threads configured 
		  on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-debug-threads($config, $group-id)
  (: returns the number of debug threads configured on the task server :)


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-default-time-limit" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the default time limit configured 
		  on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-default-time-limit($config, $group-id)
  (: returns the default time limit configured on the task server :)


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-max-time-limit" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the maximum time limit configured 
		  on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-max-time-limit($config, $group-id)
  (: returns the maximum time limit configured on the task server :)


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-queue-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the number queue size configured 
		  on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-queue-size($config, $group-id)
  (: returns the queue size configured on the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-pre-commit-trigger-depth" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the maximum pre-commit trigger
		  depth configured 
		  on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-pre-commit-trigger-depth($config, $group-id)
  (: returns the pre-commit trigger depth configured on the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-post-commit-trigger-depth"
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the maximum post-commit trigger
		  depth configured 
		  on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-post-commit-trigger-depth($config, $group-id)
  (: returns the post-commit trigger depth configured on the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-pre-commit-trigger-limit" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the pre-commit trigger
		  limit configured 
		  on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-pre-commit-trigger-limit($config, $group-id)
  (: returns the pre-commit trigger limit configured on the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-log-errors" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value for the log-errors setting
		  configured on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-log-errors($config, $group-id)
  (: returns the log-errors setting configured on the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-debug-allow" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value for the debug-allow setting
		  configured on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-debug-allow($config, $group-id)
  (: returns the debug-allow setting configured on the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-get-profile-allow" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function returns the value for the profile-allow setting
		  configured on the task server for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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")
  return
  admin:taskserver-get-profile-allow($config, $group-id)
  (: returns the profile-allow setting configured on the task server :)

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-threads" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value in the configuration of
		  the maximum number of threads for the specified task server.
		  This is a "cold" operation; when you use 
		  <code>admin:save-configuration</code> to save the 
		  configuration, it will automatically restart 
		  MarkLogic Server.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new threads value.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-threads($config, $groupid, 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.  :)  
   
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-debug-threads" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value in the configuration of
		  the maximum number of debug threads for the specified 
		  task server.
		  This is a "cold" operation; when you use 
		  <code>admin:save-configuration</code> to save the 
		  configuration, it will automatically restart 
		  MarkLogic Server.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new threads value.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-debug-threads($config, $groupid, 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-default-time-limit" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the task server default time limit in the 
		  configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new value for the time limit (specified the number of 
	      seconds).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-default-time-limit($config, $groupid, 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-max-time-limit" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the task server max time limit in the 
		  configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new value for the max time limit (specified the number of 
	      seconds).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-max-time-limit($config, $groupid, 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-queue-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value in the configuration of
		  the maximum queue size for the specified 
		  task server.
		  This is a "cold" operation; when you use 
		  <code>admin:save-configuration</code> to save the 
		  configuration, it will automatically restart 
		  MarkLogic Server.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new value for the queue size.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-queue-size($config, $groupid, 100000)
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-pre-commit-trigger-depth" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value for the task server pre-commit 
		  trigger depth in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new value.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-pre-commit-trigger-depth($config, $groupid, 1000)
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-post-commit-trigger-depth" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value for the task server post-commit 
		  trigger depth in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new post-commit trigger depth.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-post-commit-trigger-depth($config, $groupid, 1000)
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-pre-commit-trigger-limit" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value for the task server pre-commit 
		  trigger depth in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
	      The new value.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-pre-commit-trigger-depth($config, $groupid, 1000)
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-log-errors" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value for the log errors setting 
		  for the task server in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    The new boolean value.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-log-errors($config, $groupid, 1000)
  (: 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-debug-allow" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value for the debug allow setting 
		  for the task server in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    The new boolean value.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-debug-allow($config, $groupid, 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="taskserver-set-profile-allow" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
	  <apidoc:summary>
		  This function sets the value for the profile allow setting 
		  for the task server in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group to which the App Server belongs.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    The new boolean value.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:taskserver-set-profile-allow($config, $groupid, 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.  :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-host-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the IDs of all hosts belonging to the group.
    </apidoc:summary>
    <apidoc:params>
      <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>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-host-ids($config, admin:group-get-id($config,"myGroup"))
  (: returns the group's host IDs :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-appserver-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the IDs of all appservers belonging to the group.
    </apidoc:summary>
    <apidoc:params>
      <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>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-appserver-ids($config, admin:group-get-id($config,"myGroup"))
  (: returns the group's appserver IDs :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-httpserver-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the IDs of all httpservers belonging to the group.
    </apidoc:summary>
    <apidoc:params>
      <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>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-httpserver-ids($config, admin:group-get-id($config,"myGroup"))
  (: returns the group's httpserver IDs :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-xdbcserver-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the IDs of all xdbcservers belonging to the group.
    </apidoc:summary>
    <apidoc:params>
      <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>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-xdbcserver-ids($config, admin:group-get-id($config,"myGroup"))
  (: returns the group's xdbcserver IDs :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-webdavserver-ids" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the IDs of all webdavservers belonging to the group.
    </apidoc:summary>
    <apidoc:params>
      <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>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-webdavserver-ids($config, admin:group-get-id($config,"myGroup"))
  (: returns the group's webdavserver IDs :)  
  ]]></pre></apidoc:example>
  </apidoc:function>

  <apidoc:function name="group-get-taskserver-id" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the ID of of the taskserver belonging to the group.
    </apidoc:summary>
    <apidoc:params>
      <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>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-taskserver-id($config, admin:group-get-id($config,"myGroup"))
  (: returns the group's taskserver ID :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
      
  <apidoc:function name="group-get-id" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the ID of the group.
		  The difference between this function and <code>xdmp:group()</code> 
		  is that the ID from 
		  this function can come from a group that has not yet been saved (that is, 
		  from a group 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 group without the 
		  need to first save the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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-name" type="xs:string">
		    The name of the group.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-id($config, "myGroup"))
  (: returns the group ID :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the name of the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-name($config, admin:group-get-id($config, "myGroup"))
  (: returns the group name :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-list-cache-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the list cache size
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-list-cache-size($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the list cache size value :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-list-cache-partitions" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the list cache partitions
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-list-cache-partitions($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the list cache partitions value :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-compressed-tree-cache-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the compressed tree
		  cache size setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-compressed-tree-cache-size($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the compressed tree cache size value :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-compressed-tree-cache-partitions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
 	  <apidoc:summary>
		  This function returns the value for the compressed tree
		  cache partitions setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-compressed-tree-cache-partitions($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the compressed tree cache partitions value :)  


  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-compressed-tree-read-size" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the value for the compressed tree
      read size (in kilobytes) setting from the specified group.
    </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-compressed-tree-read-size($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the compressed tree read size value :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-expanded-tree-cache-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the expanded tree
		  cache size setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-expanded-tree-cache-size($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the expanded tree cache size value :)  

  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-expanded-tree-cache-partitions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the expanded tree
		  cache partitions setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-expanded-tree-cache-partitions($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the expanded tree cache partitions value :)  


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-smtp-relay" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the smtp relay
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-smtp-relay($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the smtp relay value :)  


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-smtp-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the smtp timeout
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-smtp-timeout($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the smtp timeout value :)  


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-http-user-agent" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the http user agent
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-http-user-agent($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the http user agent value :)  


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-http-timeout" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the http timeout
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-http-timeout($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the http timeout value :)  


  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-xdqp-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the xdqp timeout
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-xdqp-timeout($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the xdqp timeout value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-host-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the host timeout
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-host-timeout($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the host timeout value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-host-initial-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the host initial timeout
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-host-initial-timout($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the host initial timeout value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-retry-timeout" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the value for the number of seconds a request
      will retry before timing out.
    </apidoc:summary>
    <apidoc:params>
    <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-host-retry-timout($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the host initial timeout value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-system-log-level" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the system log level
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-system-log-level($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the system log level value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-file-log-level" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the file log level
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-file-log-level($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the file log level value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-rotate-log-files" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the rotate log files
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-rotate-log-files($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the rotate log files value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-keep-log-files" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the keep log files
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-keep-log-files($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the keep log files value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-failover-enable" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the failover enable
		  setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-failover-enable($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the failover enable value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-trace-events-activated" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value for the trace events
		  activated setting from the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-trace-events-activated($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the trace events activated value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-schemas" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value of any schemas definitions
		  predefined for the specified group.  If none are defined,
		  returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:schema)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-schemas($config, $groupid)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-namespaces" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value of any namespace definitions
		  predefined for the specified group.  If none are defined,
		  returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:namespace)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-namespaces($config, $groupid)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-trace-events" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function returns the value of any trace events
		  activated for the specified group.  If none are defined,
		  returns the empty sequence.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:event)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-trace-events($config, $groupid)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-name" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the name of the group with the
		  specified ID to the specified name.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new name for the group.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-name($config, $groupid, "myNewGroupName")
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-list-cache-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the list cache size setting
		  of the group with the
		  specified ID to the specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new list cache value (in megabytes).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-list-cache-size($config, $groupid, 256)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-list-cache-partitions" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the list cache partitions setting
		  of the group with the
		  specified ID to the specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new value for the partions.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-list-cache-partitions($config, $groupid, 2)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-compressed-tree-cache-size" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the compressed tree cache size setting
		  of the group with the
		  specified ID to the specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new cache value (in megabytes).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-compressed-tree-cache-size($config, $groupid, 256)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-compressed-tree-cache-partitions" 
	  lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the compressed tree cache partitions
		  setting of the group with the
		  specified ID to the specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new value for the partions.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-compressed-tree-cache-partitions($config, $groupid, 2)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-set-compressed-tree-read-size" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function changes the compressed tree read size setting
      of the group with the
      specified ID to the specified value.
    </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
        The new read size value (in kilobytes).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-compressed-tree-read-size($config, $groupid, 256)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>

  <apidoc:function name="group-set-expanded-tree-cache-size" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the expanded tree cache size setting
		  of the group with the
		  specified ID to the specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new cache value (in megabytes).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-expanded-tree-cache-size($config, $groupid, 256)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-expanded-tree-cache-partitions" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the expanded tree cache partitions
		  setting of the group with the
		  specified ID to the specified value.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new value for the partions.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-expanded-tree-cache-partitions($config, $groupid, 2)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-smtp-relay" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the SMTP relay setting for the group
		  in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new value for the SMTP relay host.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return
  admin:group-set-smtp-relay($config, $groupid, "mail")
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-smtp-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the SMTP timeout setting for the group
		  in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new SMTP response timeout (in seconds).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-smtp-timeout($config, $groupid, 30)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-http-user-agent" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the HTTP User-Agent setting for 
		  the group in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new value for the HTTP User-Agent.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-http-user-agent($config, $groupid, "MarkLogic")
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-http-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the HTTP timeout setting for the group
		  in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new timeout setting (in seconds).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-http-timeout($config, $groupid, 60)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-xdqp-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the XDQP timeout setting (the timeout
		  for communication between data nodes and evaluator nodes) 
		  for the group in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new timeout setting (in seconds).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-xdqp-timout($config, $groupid, 20)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-host-timeout" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the host timeout setting (the timeout
		  for communication between hosts) for the group
		  in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new timeout setting (in seconds).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-host-timout($config, $groupid, 60)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-host-initial-timeout" lib="admin"
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the host initial timeout setting 
		  (the time the cluster will wait for a host to come online
		  during cluster startup) for the group
		  in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    The new timeout setting (in seconds).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-host-initial-timout($config, $groupid, 300)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-set-retry-timeout" lib="admin"
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function changes the the number of seconds a request
      will retry before timing out.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
        The new timeout setting (in seconds).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-retry-timout($config, $groupid, 180)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-set-system-log-level" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
 	  <apidoc:summary>
		  This function changes the host system log level setting 
		  for the group in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new log level (must be one of <code>finest</code>, 
		    <code>finer</code>, <code>fine</code>, 
		    <code>debug</code>, <code>config</code>,
		    <code>info</code>, <code>notice</code>,
		    <code>warning</code>, <code>error</code>, 
		    <code>critical</code>,
		    <code>alert</code>, <code>emergency</code>).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-file-log-level" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
 	  <apidoc:summary>
		  This function changes the host file log level setting 
		  for the group in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new log level (must be one of <code>finest</code>, 
		    <code>finer</code>, <code>fine</code>, 
		    <code>debug</code>, <code>config</code>,
		    <code>info</code>, <code>notice</code>,
		    <code>warning</code>, <code>error</code>, 
		    <code>critical</code>,
		    <code>alert</code>, <code>emergency</code>).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-rotate-log-files" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
 	  <apidoc:summary>
		  This function changes the rotate log files setting 
		  for the group in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:string">
		    The new log level (must be one of <code>never</code>, 
		    <code>daily</code>, <code>monday</code>, 
		    <code>tuesday</code>, <code>wednesday</code>,
		    <code>thursday</code>, <code>friday</code>,
		    <code>saturday</code>, <code>sunday</code>,
		    <code>monthly</code>).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-keep-log-files" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
 	  <apidoc:summary>
		  This function changes the keep log files setting 
		  for the group in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:unsignedInt">
		    A number indicating the number of log
		    files to keep before deleting them.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-keep-log-files($config, $groupid, 20)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-failover-enable" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
 	  <apidoc:summary>
		  This function changes the failover enable setting 
		  for the group in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    The new setting (true to enable failover for the group, 
		    false to disable it).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-failover-enable($config, $groupid, 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.  :)   
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-trace-events-activated" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function changes the value for trace events in the
		  group configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="value" type="xs:boolean">
		    The new trace event value (true for enabled, false for
		    disabled).
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-trace-events-activated($config, $groupid, 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-add-schema" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function adds a schema binding definition to the 
		  existing schema binding definitions in the configuration 
		  for the specified Group.  Schemas with a schema binding
		  definition are automatically imported into queries run 
		  against any App Server in the group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="schemas" type="element(gr:schema)*">
		    A list of schema specification elements of the form:
		    <pre xml:space="preserve"><![CDATA[
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
  <namespace-uri>foo</namespace-uri>
  <schema-location>/foo.xsd</schema-location>
</schema>
]]></pre>		    
             Typically the result of an <code>admin:group-schema</code> call.   
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-add-schema($config, $groupid, 
  <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
     <namespace-uri>foo</namespace-uri>
     <schema-location>/foo.xsd</schema-location>
  </schema>)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-delete-schema" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function deletes a schema binding definition to the 
		  existing schema binding definitions in the configuration 
		  for the specified Group.  
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="schemas" type="element(gr:schema)*">
		    A list of schema specification elements of the form:
		    <pre xml:space="preserve"><![CDATA[
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
  <namespace-uri>foo</namespace-uri>
  <schema-location>/foo.xsd</schema-location>
</schema>
]]></pre>		    
             Typically the result of an <code>admin:group-schema</code> call.   
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-delete-schema($config, $groupid, 
  <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns="http://marklogic.com/xdmp/group">
     <namespace-uri>foo</namespace-uri>
     <schema-location>/foo.xsd</schema-location>
  </schema>)
  (: 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.  :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-add-namespace" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  Add one or more namespaces to a Group configuration, 
		  which will predefine the namespace(s) for all requests 
		  evaluated against any App Server in the Group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="namespaces" type="element(gr:namespace)*">
		    A list of namespaces to add.  Typically the result
		    of an <code>admin:group-namespace</code> call. <p></p>
		    Each namespace specification has the following form:
		    <pre xml:space="preserve"><![CDATA[
  <namespace xmlns="http://marklogic.com/xdmp/group">
    <prefix>myprefix</prefix>
    <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
  </namespace>
	 ]]></pre>        
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-add-namespace($config, $groupid,
       <namespace xmlns="http://marklogic.com/xdmp/group">
         <prefix>myprefix</prefix>
         <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
        </namespace>)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-delete-namespace" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function deletes the specified namespaces from the
		  configuration for the specified group.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="namespaces" type="element(gr:namespace)*">
		    <p>
			    A list of namespaces to delete.  Each namespace 
			    specification has the following form:
		    </p>
		    <pre xml:space="preserve"><![CDATA[
  <namespace xmlns="http://marklogic.com/xdmp/group">
    <prefix>myprefix</prefix>
    <namespace-uri>http://myuri/forthisprefix</namespace-uri>		    
  </namespace>
	 ]]></pre>
         Typically the result of an <code>admin:group-namespace</code> call.   
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-delete-namespace($config, $groupid, 
        admin:group-get-namespaces($config, $groupid))

  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-trace-event" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function constructs an event element for the 
		  specified event name.
	  </apidoc:summary>
    <apidoc:params>
	    <apidoc:param name="event-id" type="xs:string">
		    The exact name of the trace event.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(gr:event)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";

  admin:group-trace-event("CPF on-state-enter")		
  (: returns the event element for the CPF on state enter trace event :)
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-add-trace-event" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function adds trace events to the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="events" type="element(gr:event)*">
		    Zero or more event specifications, which you can 
		    construct with the <code>admin:group-trace-event</code>
		    function.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-add-trace-event($config, 
      admin:group-get-id($config, "Default"), 
      admin:group-trace-event("CPF on-state-enter"))
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-delete-trace-event" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function deletes the specified trace events from 
		  the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="events" type="element(gr:event)*">
		    Zero or more event specifications, which you can 
		    construct with the <code>admin:group-trace-event</code>
		    function.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-delete-trace-event($config, 
      admin:group-get-id($config, "Default"), 
      admin:group-trace-event("CPF on-state-enter"))
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-delete" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function deletes one or more groups in the configuration.
	  </apidoc:summary>
    <apidoc:params>
            <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-ids" type="xs:unsignedLong*">
		    The IDs of the groups to be deleted.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:usage>
     Any group whose ID you pass into this function must not have any hosts
     belonging to it when the transaction begins, otherwise an exception is thrown.  
     If you need to delete the group, remove its hosts in a separate transaction before 
     calling this function. 
    </apidoc:usage>

    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-delete($config, admin:group-get-id($config, "myOldGroup"))
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-create" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function creates a new group with the specified
		  name in the configuration.  The new group has the default
		  values.
	  </apidoc:summary>
    <apidoc:params>
            <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-name" type="xs:string">
		    The name for the new group.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-create($config, "myNewGroup")
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-copy" lib="admin" 
	  category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
	  <apidoc:summary>
		  This function creates a new group specification with the
		  same settings as the group with the specified ID.  The new
		  group configuration will have the specified name.
	  </apidoc:summary>
    <apidoc:params>
            <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 ID of the group.
		    Typically, this is the result
		    of an <code>admin:group-get-id</code> call.
	    </apidoc:param>
	    <apidoc:param name="group-name" type="xs:string">
		    The name of the new group to create.
	    </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-copy($config, admin:group-get-id($config, "myOldGroup"), 
                    "myNewGroup")

  (: 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.  :) 
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="group-get-audit-enabled" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the value for the audit enabled
      setting from the specified group.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-enabled($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the failover enable value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>

  <apidoc:function name="group-set-audit-enabled" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function changes the audit enabled setting 
      for the group in the configuration.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:boolean">
        The new setting (true to enable auditing for the group, 
        false to disable it).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-enabled($config, $groupid, 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.  :)   
  ]]></pre></apidoc:example>
  </apidoc:function>

  <apidoc:function name="group-get-rotate-audit-files" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the value for the rotate audit files
      setting from the specified group.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-rotate-audit-files($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the rotate audit files value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-keep-audit-files" lib="admin"
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the value for the keep audit files
      setting from the specified group.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedInt</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-keep-audit-files($config, 
        admin:group-get-id($config, "myGroup"))
  (: returns the keep audit files value :)  
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-set-rotate-audit-files" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function changes the rotate audit files setting 
      for the group in the configuration.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
        The new audit level (must be one of <code>never</code>, 
        <code>daily</code>, <code>monday</code>, 
        <code>tuesday</code>, <code>wednesday</code>,
        <code>thursday</code>, <code>friday</code>,
        <code>saturday</code>, <code>sunday</code>,
        <code>monthly</code>).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-set-keep-audit-files" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function changes the keep audit files setting 
      for the group in the configuration.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="value" type="xs:unsignedInt">
        A number indicating the number of audit log
        files to keep before deleting them.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-keep-audit-files($config, $groupid, 20)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-enable-audit-event-type" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function changes the audit event type(s) enabled setting 
      for the audit configuration.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="event-type" type="xs:string*">
        The event types to enable
        (must be one of:
          "amp-usage"
          "audit-configuration-change"
          "audit-shutdown"
          "audit-startup"
          "authentication-failure"
          "concurrent-request-denial"
          "configuration-change"
          "document-execute"            
          "document-insert"
          "document-read"
          "document-update"      
          "estimate"
          "eval"
          "exists"
          "lexicon-read"
          "no-permission"
          "no-privilege"
          "permission-change"
          "request-blackout-denial"
          "role-change-failure"
          "search"      
          "security-access"
          "server-restart"            
          "server-shutdown"
          "server-startup"
          "user-configuration-change"
          "user-role-addition"
          "user-role-removal"      
        ).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-enable-audit-event-type($config, $groupid, 
        ("no-permission","no-privilege"))
  (: 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.  :)   
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-disable-audit-event-type" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function changes the audit event type(s) enabled setting 
      for the audit configuration.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="event-type" type="xs:string*">
        The event types to disable
        (must be one of:
          "amp-usage"
          "audit-configuration-change"
          "audit-shutdown"
          "audit-startup"
          "authentication-failure"
          "concurrent-request-denial"
          "configuration-change"
          "document-execute"            
          "document-insert"
          "document-read"
          "document-update"      
          "estimate"
          "eval"
          "exists"
          "lexicon-read"
          "no-permission"
          "no-privilege"
          "permission-change"
          "request-blackout-denial"
          "role-change-failure"
          "search"      
          "security-access"
          "server-restart"            
          "server-shutdown"
          "server-startup"
          "user-configuration-change"
          "user-role-addition"
          "user-role-removal"      
        ).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-disable-audit-event-type($config, $groupid, 
        ("no-permission","no-privilege"))
  (: 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.  :)    
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-get-audit-event-type-enabled" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the audit event type's enabled setting 
      for the audit configuration.  A value of <code>true</code> is returned is the
      specified event type is set.  Otherwise <code>false</code> is returned.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="event-type" type="xs:string">
        The event type to check
        (must be one of:
          "amp-usage"
          "audit-configuration-change"
          "audit-shutdown"
          "audit-startup"
          "authentication-failure"
          "concurrent-request-denial"
          "configuration-change"
          "document-execute"            
          "document-insert"
          "document-read"
          "document-update"      
          "estimate"
          "eval"
          "exists"
          "lexicon-read"
          "no-permission"
          "no-privilege"
          "permission-change"
          "request-blackout-denial"
          "role-change-failure"
          "search"      
          "security-access"
          "server-restart"            
          "server-shutdown"
          "server-startup"
          "user-configuration-change"
          "user-role-addition"
          "user-role-removal"      
        ).
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:boolean</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-event-type-enabled($config, $groupid, 
        "no-permission")
  (: returns the new enabled status for the No-Permission event-type :)    
  ]]></pre></apidoc:example>
  </apidoc:function>    
  
  <apidoc:function name="group-set-audit-user-restriction" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function restricts the audit configuration by excluding or
      including by user.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="restriction-type" type="xs:string">
        The restriction type
        (must be one of: "inclusion" or "exclusion").
      </apidoc:param>
      <apidoc:param name="users" type="xs:string*">
        The sequence of users affected by the restriction type.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)    
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-get-audit-excluded-users" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the users excluded from auditing. If auditing
      has a "inclusion" restriction, this function returns the empty sequence.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-excluded-users($config, $groupid) 
  (: returns a sequence of users in the excluded user restriction:)    
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-get-audit-included-users" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the users included from auditing. If auditing
      has a "exclusion" restriction, this function returns the empty sequence.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-included-users($config, $groupid) 
  (: returns a sequence of users in the included user restriction:)    
  ]]></pre></apidoc:example>
  </apidoc:function>    
  
  <apidoc:function name="group-set-audit-role-restriction" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function restricts the audit configuration by excluding or
      including by role.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="restriction-type" type="xs:string">
        The restriction type
        (must be one of: "inclusion" or "exclusion").
      </apidoc:param>
      <apidoc:param name="roles" type="xs:string*">
        The sequence of roles affected by the restriction type.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)    
  ]]></pre></apidoc:example>
  </apidoc:function>    
  
  <apidoc:function name="group-get-audit-excluded-roles" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the roles excluded from auditing. If auditing
      has a "inclusion" restriction, this function returns the empty sequence.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-excluded-roles($config, $groupid) 
  (: returns a sequence of roles in the excluded role restriction:)    
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-get-audit-included-roles" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the roles included from auditing. If auditing
      has a "exclusion" restriction, this function returns the empty sequence.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:unsignedLong*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-included-roles($config, $groupid) 
  (: returns a sequence of roles in the included role restriction:)    
  ]]></pre></apidoc:example>
  </apidoc:function>      
  
  <apidoc:function name="group-set-audit-uri-restriction" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function restricts the audit configuration by excluding or
      including by document uri(s).
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="restriction-type" type="xs:string">
        The restriction type
        (must be one of: "inclusion" or "exclusion").
      </apidoc:param>
      <apidoc:param name="uris" type="xs:string*">
        The sequence of document-uris affected by the restriction type.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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.  :)    
  ]]></pre></apidoc:example>
  </apidoc:function>   
  
  <apidoc:function name="group-get-audit-excluded-uris" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the uris excluded from auditing. If auditing
      has a "inclusion" restriction, this function returns the empty sequence.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-excluded-uris($config, $groupid) 
  (: returns a sequence of uris in the excluded uri restriction:)    
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="group-get-audit-included-uris" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns the uris included from auditing. If auditing
      has a "exclusion" restriction, this function returns the empty sequence.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-included-uris($config, $groupid) 
  (: returns a sequence of uris in the included uri restriction:)   
  ]]></pre></apidoc:example>
  </apidoc:function>    
  
  <apidoc:function name="group-set-audit-outcome-restriction" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function restricts the audit configuration by auditing
      events only if they are "success" or "failure" events.
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
      <apidoc:param name="outcome" type="xs:string*">
        The outcomes to audit
        (must be one of: "success" or "failure" or "both").
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-outcome-restriction($config, $groupid, 
        "failure")
  (: 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.  :)   
  ]]></pre></apidoc:example>
  </apidoc:function>    
  
  <apidoc:function name="group-get-audit-outcome-restriction" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
    <apidoc:summary>
      This function returns whether auditing events are restricted by a 
      success or failure outcome. Returns "success","failure", or "both"
    </apidoc:summary>
    <apidoc:params>
      <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 ID of the group.
        Typically, this is the result
        of an <code>admin:group-get-id</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>xs:string</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-audit-outcome-restriction($config, $groupid) 
  (: returns either "success","failure", or "both":)    
  ]]></pre></apidoc:example>
  </apidoc:function>  
  
  <apidoc:function name="mimetypes-add" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="mimetypes">
    <apidoc:summary>
      This function adds mimetypes to the configuration. This function always requires
      a server restart to take effect. 
    </apidoc:summary>
    <apidoc:params>
      <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="mimetypes" type="element(mt:mimetype)*">
        A mimetype specification, typically the result of an
        <code>admin:mimetype</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $mimetype := admin:mimetype("application/foo","foo bar","binary")
  return
  admin:mimetypes-add($config, $mimetype)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>

  <apidoc:function name="mimetypes-delete" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="mimetypes">
    <apidoc:summary>
      This function deletes mimetypes from the configuration. This function always requires
      a server restart to take effect. 
    </apidoc:summary>
    <apidoc:params>
      <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="mimetypes" type="element(mt:mimetype)*">
        A mimetype specification, typically the result of an
        <code>admin:mimetype</code> call.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(configuration)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $mimetype := admin:mimetype("application/foo","foo bar","binary")
  return
  admin:mimetypes-delete($config, $mimetype)
  (: 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.  :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="mimetypes-get" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="mimetypes">
    <apidoc:summary>
      This function returns all the mimetypes from the configuration. 
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="config" type="element(configuration)">
        A configuration specification, typically as returned 
        from one of the Admin module functions.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(mt:mimetype)*</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:mimetypes-get($config)
  (: returns the mimetypes specifications for the cluster :)  
  ]]></pre></apidoc:example>
  </apidoc:function>
  
  <apidoc:function name="mimetype" lib="admin" 
    category="Admin Library" bucket="XQuery Library Modules" subcategory="mimetypes">
    <apidoc:summary>
      This function constructs a mimetype specification. 
    </apidoc:summary>
    <apidoc:params>
      <apidoc:param name="name" type="xs:string">
        The name of the mimetype.
      </apidoc:param>
      <apidoc:param name="extensions" type="xs:string">
        The extension(s) for the mimetype.
      </apidoc:param>
      <apidoc:param name="format" type="xs:string">
        A valid format for the mimetype. Must be on of:
        <code>binary</code>,<code>xml</code>, or <code>text</code>.
      </apidoc:param>
    </apidoc:params>
    <apidoc:return>element(mt:mimetype)</apidoc:return>
    <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
  return  
  admin:mimetype("application/foo","foo bar","binary")
  (: returns the mimetype specification :)  
  ]]></pre></apidoc:example>
  </apidoc:function>


  <apidoc:function name="database-daily-backup" lib="admin" 
     category="Admin Library" bucket="XQuery Library Modules" 
     subcategory="database" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a daily scheduled database backup.</apidoc:summary>
  <apidoc:params>
     <apidoc:param name="backup-dir" type="xs:string">
        The directory to save the backup. </apidoc:param>
     <apidoc:param name="backup-period" type="xs:positiveInteger">
       The number of days to elapse between each backup</apidoc:param>
     <apidoc:param name="start-time" type="xs:time">
	The time of day of the backup, in 24:00:00 notation.</apidoc:param>
     <apidoc:param name="max-backups" type="xs:unsignedLong">
        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. 
     </apidoc:param>
     <apidoc:param name="backup-security-db" type="xs:boolean">
	     Whether to backup the security database alongside the current 
	     backup. 
     </apidoc:param>
     <apidoc:param name="backup-schemas-db" type="xs:boolean">
	     Whether to backup the schemas database alongside the current 
	     backup. 
     </apidoc:param>
     <apidoc:param name="backup-triggers-db" type="xs:boolean">
	     Whether to backup the triggers database alongside the current 
	     backup. 
     </apidoc:param>
      <apidoc:param name="include-replicas" type="xs:boolean" optional="true">
	      If set to <code>false</code>, do not include the replicas in 
	      the backup.  The default is <code>true</code>, which means to 
	      include all replicas in the backup.
      </apidoc:param>    
  </apidoc:params>
  <apidoc:return>element(db:database-backup)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 :)
   ]]></pre>
  </apidoc:example>
  </apidoc:function>
  <apidoc:function name="database-hourly-backup" lib="admin" category="Admin Library"
       bucket="XQuery Library Modules" subcategory="database" 
       xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a hourly scheduled database backup.</apidoc:summary>
  <apidoc:params>
    <apidoc:param name="backup-dir" type="xs:string">
       The directory to save the backup.</apidoc:param>
    <apidoc:param name="backup-period" type="xs:positiveInteger">
       The number of hours to elapse between each backup. </apidoc:param>
    <apidoc:param name="start-minute" type="xs:nonNegativeInteger">
       The number of minutes after the hour to start the backup. Note that this 
       setting does not add to the backup period value.</apidoc:param>
    <apidoc:param name="max-backups" type="xs:unsignedLong">
       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.
     </apidoc:param>
     <apidoc:param name="backup-security-db" type="xs:boolean">
	     Whether to backup the security database alongside the current 
	     backup. 
     </apidoc:param>
     <apidoc:param name="backup-schemas-db" type="xs:boolean">
	     Whether to backup the schemas database alongside the current 
	     backup. 
     </apidoc:param>
     <apidoc:param name="backup-triggers-db" type="xs:boolean">
	     Whether to backup the triggers database alongside the current 
	     backup. 
      </apidoc:param>
      <apidoc:param name="include-replicas" type="xs:boolean" optional="true">
	      If set to <code>false</code>, do not include the replicas in 
	      the backup.  The default is <code>true</code>, which means to 
	      include all replicas in the backup.
      </apidoc:param>    
  </apidoc:params>
  <apidoc:return>element(db:database-backup)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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. :) 
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="database-minutely-backup" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a scheduled database backup on a number-of-minutes basis.
  </apidoc:summary>
  <apidoc:params>
    <apidoc:param name="backup-dir" type="xs:string">
       The directory to save the backup.</apidoc:param>
    <apidoc:param name="backup-period" type="xs:positiveInteger">
       The number of minutes to elapse between each backup.</apidoc:param>
    <apidoc:param name="max-backups" type="xs:unsignedLong">
       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.
     </apidoc:param>
     <apidoc:param name="backup-security-db" type="xs:boolean">
	     Whether to backup the security database alongside the current 
	     backup. 
     </apidoc:param>
     <apidoc:param name="backup-schemas-db" type="xs:boolean">
	     Whether to backup the schemas database alongside the current 
	     backup. 
     </apidoc:param>
     <apidoc:param name="backup-triggers-db" type="xs:boolean">
	     Whether to backup the triggers database alongside the current 
	     backup. 
      </apidoc:param>
      <apidoc:param name="include-replicas" type="xs:boolean" optional="true">
	      If set to <code>false</code>, do not include the replicas in 
	      the backup.  The default is <code>true</code>, which means to 
	      include all replicas in the backup.
      </apidoc:param>    
  </apidoc:params>
  <apidoc:return>element(db:database-backup)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
  <apidoc:function name="forest-hourly-backup" lib="admin" category="Admin Library" 
     bucket="XQuery Library Modules" subcategory="forest" 
     xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a hourly scheduled forest backup.</apidoc:summary>
  <apidoc:params>
    <apidoc:param name="backup-dir" type="xs:string">
       The directory to save the backup.</apidoc:param>
    <apidoc:param name="backup-period" type="xs:positiveInteger">
       The number of hours to elapse between each backup</apidoc:param>
    <apidoc:param name="start-minute" type="xs:nonNegativeInteger">
       The number of minutes after the hour to start the backup. Note that this 
       setting does not add to the backup period value.</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(as:forest-backup)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-hourly-backup("/backup-dir", 2, 30)
 
  (: returns the hourly forest 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. :) 
   ]]></pre>
  </apidoc:example>
  </apidoc:function>
  <apidoc:function name="forest-minutely-backup" lib="admin" category="Admin Library" 
     bucket="XQuery Library Modules" subcategory="forest" 
     xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a scheduled forest backup on a number-of-minutes basis.
  </apidoc:summary>
  <apidoc:params>
    <apidoc:param name="backup-dir" type="xs:string">The directory to save the backup.</apidoc:param>
    <apidoc:param name="backup-period" type="xs:positiveInteger">
       The number of minutes to elapse between each backup</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(as:forest-backup)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-minutely-backup("/backup-dir", 45)

  (: returns the minutely forest backup specification. :)
   ]]></pre>
  </apidoc:example>
  </apidoc:function>
  <apidoc:function name="group-get-scheduled-tasks" lib="admin" 
     category="Admin Library" bucket="XQuery Library Modules" 
     subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function returns all of the tasks scheduled for the specified
  group. </apidoc:summary>
  <apidoc:params>
    <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 ID of the group on which the scheduled tasks are configured.
        Typically, this is the result of an 
	<code>admin:group-get-id</code> call.</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(gr:scheduled-task)*</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-scheduled-tasks($config, 
      admin:group-get-id($config, "Default"))
  
   =>

  <scheduled-task xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://marklogic.com/xdmp/group">
    <task-path>/Scheduler_test.xqy</task-path>
    <task-root>/Docs</task-root>
    <task-type>minutely</task-type>
    <task-period>15</task-period>
    <task-days/>
    <task-timestamp>2009-02-27T12:16:06.152-08:00</task-timestamp>
    <task-database>3439178527237237454</task-database>
    <task-modules>0</task-modules>
    <task-user>10677693687367813363</task-user>
  </scheduled-task>
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-add-scheduled-task" lib="admin" 
	category="Admin Library" bucket="XQuery Library Modules" 
	subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function adds one or more scheduled tasks to the specified group.</apidoc:summary>
  <apidoc:params>
    <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 ID of the group on which the scheduled tasks are configured.
        Typically, this is the result of an 
	<code>admin:group-get-id</code> call.</apidoc:param>
    <apidoc:param name="scheduled-tasks" type="element(gr:scheduled-task)*">
        One or more scheduled tasks, such as those created by the task-create 
	functions. </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-delete-scheduled-task" lib="admin" 
	category="Admin Library" bucket="XQuery Library Modules" 
	subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function deletes one or more scheduled tasks from the specified group.
  </apidoc:summary>
  <apidoc:params>
    <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 ID of the group on which the scheduled tasks are configured.
        Typically, this is the result of an 
	<code>admin:group-get-id</code> call.</apidoc:param>
    <apidoc:param name="scheduled-tasks" type="element(gr:scheduled-task)*">
        One or more scheduled tasks. 
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config, "Default")
  let $tasks := admin:group-get-scheduled-tasks($config, $group)

  return  
   admin:group-delete-scheduled-task($config, $group, $tasks)
  
  (: Returns a configuration element with the scheduled tasks in the 
      "Default" group deleted -- use admin:save-configuration
      to save the changes to the configuration or pass the configuration
      to other Admin API functions to make other changes. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-one-time-scheduled-task" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a task to be invoked once, at a specific calendar day and time.
  </apidoc:summary>
  <apidoc:params>
    <apidoc:param name="task-path" type="xs:string">
	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.
    </apidoc:param>
    <apidoc:param name="task-root" type="xs:string">
	 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. 
    </apidoc:param>
    <apidoc:param name="task-start" type="xs:dateTime">The date and time on which the task is to start.
    </apidoc:param>
    <apidoc:param name="task-database" type="xs:unsignedLong">The id of the database on which the module 
	 is to be invoked.</apidoc:param>
    <apidoc:param name="task-modules" type="xs:unsignedLong">The id of the modules database. 
	For example, xdmp:database("Modules"). To specify the filesystem, use 0. 
    </apidoc:param>
    <apidoc:param name="task-user" type="xs:unsignedLong">The id of the user with permission to
        invoke the module.  For example, xdmp:user("Jim"). </apidoc:param>
    <apidoc:param name="task-host" type="xs:unsignedLong?">The id of the host on which to 
	invoke the module. Leave empty, (), to specify all hosts.</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(gr:scheduled-task)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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()))

    (: returns a one-time scheduled task. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-monthly-scheduled-task" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a task to be invoked at monthly intervals. </apidoc:summary>
  <apidoc:params>
    <apidoc:param name="task-path" type="xs:string">
	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.
    </apidoc:param>
    <apidoc:param name="task-root" type="xs:string">
	 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. 
    </apidoc:param>
    <apidoc:param name="task-period" type="xs:positiveInteger">The number of months to elapse 
	 between each invocation of the module. </apidoc:param>
    <apidoc:param name="task-month-day" type="xs:unsignedLong">The day of the month to invoke the module.
    </apidoc:param>
    <apidoc:param name="task-start-time" type="xs:time">The time of day (in 24:00 notation) to
	 invoke the module.</apidoc:param>
    <apidoc:param name="task-database" type="xs:unsignedLong">The id of the database on which the module 
	 is to be invoked.</apidoc:param>
    <apidoc:param name="task-modules" type="xs:unsignedLong">The id of the modules database. 
	For example, xdmp:database("Modules"). To specify the filesystem, use 0. 
    </apidoc:param>
    <apidoc:param name="task-user" type="xs:unsignedLong">The id of the user with permission to
        invoke the module.  For example, xdmp:user("Jim"). </apidoc:param>
    <apidoc:param name="task-host" type="xs:unsignedLong?">The id of the host on which to 
	invoke the module. Leave empty, (), to specify all hosts.</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(gr:scheduled-task)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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)

     (: returns a monthly scheduled task. :) 
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-weekly-scheduled-task" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a task to be invoked at weekly intervals.</apidoc:summary>
  <apidoc:params>
    <apidoc:param name="task-path" type="xs:string">
	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.
    </apidoc:param>
    <apidoc:param name="task-root" type="xs:string">
	 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. 
    </apidoc:param>
    <apidoc:param name="task-period" type="xs:positiveInteger">The number of weeks to elapse 
	 between each invocation of the module. </apidoc:param>
    <apidoc:param name="task-days" type="xs:string+">One or more days on the specified week to 
	 invoke the module</apidoc:param>
    <apidoc:param name="task-start-time" type="xs:time">The time of day (in 24:00 notation) to
	 invoke the module.</apidoc:param>
    <apidoc:param name="task-database" type="xs:unsignedLong">The id of the database on which the module 
	 is to be invoked.</apidoc:param>
    <apidoc:param name="task-modules" type="xs:unsignedLong">The id of the modules database. 
	For example, xdmp:database("Modules"). To specify the filesystem, use 0. 
    </apidoc:param>
    <apidoc:param name="task-user" type="xs:unsignedLong">The id of the user with permission to
        invoke the module.  For example, xdmp:user("Jim"). </apidoc:param>
    <apidoc:param name="task-host" type="xs:unsignedLong?">The id of the host on which to 
	invoke the module. Leave empty, (), to specify all hosts.</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(gr:scheduled-task)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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()))

     (: returns a weekly scheduled task. :)	
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-daily-scheduled-task" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a task to be invoked at daily intervals.</apidoc:summary>
  <apidoc:params>
    <apidoc:param name="task-path" type="xs:string">
	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.
    </apidoc:param>
    <apidoc:param name="task-root" type="xs:string">
	 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. 
    </apidoc:param>
    <apidoc:param name="task-period" type="xs:positiveInteger">The number of days to elapse 
	 between each invocation of the module. </apidoc:param>
    <apidoc:param name="task-start-time" type="xs:time">The time of day (in 24:00 notation) to
	 invoke the module.</apidoc:param>
    <apidoc:param name="task-database" type="xs:unsignedLong">The id of the database on which the module 
	 is to be invoked.</apidoc:param>
    <apidoc:param name="task-modules" type="xs:unsignedLong">The id of the modules database. 
	For example, xdmp:database("Modules"). To specify the filesystem, use 0. 
    </apidoc:param>
    <apidoc:param name="task-user" type="xs:unsignedLong">The id of the user with permission to
        invoke the module.  For example, xdmp:user("Jim"). </apidoc:param>
    <apidoc:param name="task-host" type="xs:unsignedLong?">The id of the host on which to 
	invoke the module.  Leave empty, (), to specify all hosts.</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(gr:scheduled-task)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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)

  (: returns a daily scheduled task. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-hourly-scheduled-task" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a task to be invoked at hourly intervals.</apidoc:summary>
  <apidoc:params>
    <apidoc:param name="task-path" type="xs:string">
	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.
    </apidoc:param>
    <apidoc:param name="task-root" type="xs:string">
	 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. 
    </apidoc:param>
    <apidoc:param name="task-period" type="xs:positiveInteger">The number of hours to elapse 
	 between each invocation of the module. </apidoc:param>
    <apidoc:param name="task-minute" type="xs:nonNegativeInteger">
       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.</apidoc:param>
    <apidoc:param name="task-database" type="xs:unsignedLong">The id of the database on which the module 
	 is to be invoked.</apidoc:param>
    <apidoc:param name="task-modules" type="xs:unsignedLong">The id of the modules database. 
	For example, xdmp:database("Modules"). To specify the filesystem, use 0. 
    </apidoc:param>
    <apidoc:param name="task-user" type="xs:unsignedLong">The id of the user with permission to
        invoke the module.  For example, xdmp:user("Jim"). </apidoc:param>
    <apidoc:param name="task-host" type="xs:unsignedLong?">The id of the host on which to 
	invoke the module. Leave empty, (), to specify all hosts.</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(gr:scheduled-task)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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)
  
    (: returns an hourly scheduled task. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-minutely-scheduled-task" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="Scheduler" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a task to be invoked at intervals defined in terms of minutes.
  </apidoc:summary>
  <apidoc:params>
    <apidoc:param name="task-path" type="xs:string">
	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.
    </apidoc:param>
    <apidoc:param name="task-root" type="xs:string">
	 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. 
    </apidoc:param>
    <apidoc:param name="task-period" type="xs:positiveInteger">The number of minutes to elapse 
	 between each invocation of the module. </apidoc:param>
    <apidoc:param name="task-database" type="xs:unsignedLong">The id of the database on which the module 
	 is to be invoked.</apidoc:param>
    <apidoc:param name="task-modules" type="xs:unsignedLong">The id of the modules database. 
	For example, xdmp:database("Modules"). To specify the filesystem, use 0. 
    </apidoc:param>
    <apidoc:param name="task-user" type="xs:unsignedLong">The id of the user with permission to
        invoke the module.  For example, xdmp:user("Jim"). </apidoc:param>
    <apidoc:param name="task-host" type="xs:unsignedLong?">The id of the host on which to 
	invoke the module. Leave empty, (), to specify all hosts.</apidoc:param>
  </apidoc:params>
  <apidoc:return>element(gr:scheduled-task)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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)

    (: returns a minutely scheduled task. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-get-ssl-certificate-template" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>
	This function returns the id of the SSL certificate template used
	by the specified App Server.  If no template is set for the App Server, 
	0 is returned.
  </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
	 The ID of the App Server.   Typically, this is the result
         of an <code>admin:appserver-get-id</code> call.</apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:unsignedLong</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-ssl-certificate-template($config, $appServer)

    (: returns the id of the SSL certificate template. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-get-ssl-ciphers" lib="admin" 
	category="Admin Library" bucket="XQuery Library Modules" 
	subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>
	This function returns the SSL ciphers set for the App Server.
  </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
	The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.</apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:string</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-ssl-ciphers($config, $appServer)

  (: returns the SSL ciphers set for the App Server. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-get-ssl-hostname" lib="admin" 
	category="Admin Library" bucket="XQuery Library Modules" 
	subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>
     This function returns the SSL hostname for the specified App 
     Server. If no hostname is set, nothing is returned. 
  </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:string?</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-ssl-hostname($config, $appServer)

  (: returns the SSL hostname for the App Server, if set. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-set-ssl-certificate-template" lib="admin" category="Admin Library" 
	bucket="XQuery Library Modules" subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
	<apidoc:summary>
	This function sets an SSL certificate template for the
	specified App Server.</apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.   Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
    <apidoc:param name="value" type="xs:unsignedLong">
        The id of the certificate template.  This would typically be the result of a 
        <code>pki:insert-template(pki:create-template())</code> call.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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. :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-set-ssl-ciphers" lib="admin" category="Admin Library" 
	bucket="XQuery Library Modules" subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>
     This function sets SSL ciphers for the specified App Server.  This is the standard 
     cipher specification string for OpenSSL. 
  </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
    <apidoc:param name="value" type="xs:string">
        The SSL ciphers to set.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-ciphers($config, $appServer, "All")

  (: Sets the ciphers for the "Docs" App Server to "All".  :)
   ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-set-ssl-hostname" lib="admin" category="Admin Library" 
	bucket="XQuery Library Modules" subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>
     This function sets an SSL hostname for the specified App Server.  
     <p>
     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.</p>
  </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
    <apidoc:param name="value" type="xs:string">
        The SSL hostname.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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".  :)
   ]]></pre>
  </apidoc:example>
 </apidoc:function>
<apidoc:function name="appserver-get-ssl-allow-sslv3" lib="admin" category="Admin Library" 
bucket="XQuery Library Modules" subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function returns true if the SSL v3 protocol is enabled for the specified App 
  Server, or false if SSL v3 is disabled. </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-ssl-allow-sslv3($config, $appServer)

   (: Returns true if SSL v3 is enabled for the "Docs" App Server.  Otherwise false. :)
     ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-get-ssl-allow-tls" lib="admin" category="Admin Library" 
bucket="XQuery Library Modules" subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function returns true if the TLS protocol is enabled for the specified App 
  Server, or false if TLS is disabled.</apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-ssl-allow-tls($config, $appServer)
  
   (: Returns true if TLS is enabled for the "Docs" App Server.  Otherwise false. :)
     ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-get-ssl-client-certificate-authorities" lib="admin" 
category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver" 
xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function returns the id(s) of the client certificate authority for the 
  specified App Server.  If no client certificate authority is set, this function returns
  an empty sequence. </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:unsignedLong*</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-get-ssl-client-certificate-authorities($config, $appServer)
  
  (: Returns the id(s) of the client certificate authority for the "Docs" App Server, if set.  
  Otherwise returns an empty sequence. :)
     ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-set-ssl-allow-sslv3" lib="admin" category="Admin Library" 
bucket="XQuery Library Modules" subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function enables or disables the SSL v3 protocol for the specified App 
  Server. </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
    <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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. :)
     ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-set-ssl-allow-tls" lib="admin" category="Admin Library" 
bucket="XQuery Library Modules" subcategory="appserver" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function enables or disables the TLS protocol for the specified App 
  Server.</apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
    <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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. :)
     ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-set-ssl-client-certificate-authorities" lib="admin" 
category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver" 
xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
<apidoc: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 <code>pki:insert-trusted-certificates</code> and <code>pki:get-trusted-certificate-ids</code> 
      functions to import trusted Certificate Authorities for client certificates.
  </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
    <apidoc:param name="value" type="xs:unsignedLong*">
        One or more ids for trusted certificates generated by the certificate authority to be set.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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." :)
     ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="forest-daily-backup" lib="admin" category="Admin Library" bucket="XQuery Library Modules" xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function constructs a daily scheduled forest backup. </apidoc:summary>
  <apidoc:params>
    <apidoc:param name="backup-dir" type="xs:string">
    The directory to save the backup. 
    </apidoc:param>
    <apidoc:param name="backup-period" type="xs:positiveInteger">
    The number of days to elapse between each backup.
    </apidoc:param>
    <apidoc:param name="start-time" type="xs:time">
    The time of day of the backup, in 24:00:00 notation.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(as:forest-backup)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  admin:forest-daily-backup("/backup-dir", 2, xs:time("19:45:00"))
 
  (: returns a daily forest backup specification. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="database-set-tf-normalization" lib="admin" 
	category="Admin Library" bucket="XQuery Library Modules" 
	xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function specifies whether to use the default term-frequency 
  normalization (<code>scaled-log</code>), which scales the term frequency based on the size of 
  the document, or to use the <code>unscaled-log</code>, which uses term frequency as a function 
  of the actual term frequency in a document, regardless of the document size. 
  </apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
      <apidoc:param name="value" type="xs:string">
	      The new term-frequency normalization setting.  Must be one of:
	      <code>scaled-log</code> or <code>unscaled-log</code>.
      </apidoc:param>
    </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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." :)  
        ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="database-get-tf-normalization" lib="admin" 
	category="Admin Library" bucket="XQuery Library Modules" 
	xmlns:apidoc="http://marklogic.com/xdmp/apidoc">
  <apidoc:summary>This function returns the current term-frequency 
  normalization setting for the database.  The returned value is either 
  (<code>scaled-log</code>), which means to scale the term frequency based on the size of 
  the document, or <code>unscaled-log</code>, which means to use term frequency as a function 
  of the actual term frequency in a document, regardless of the document size. 

</apidoc:summary>
    <apidoc:params>
            <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="database-id" type="xs:unsignedLong">
	      The id of the database (for example, 
	      <code>xdmp:database("myDatabase")</code>).
      </apidoc:param>
    </apidoc:params>
  <apidoc:return>xs:string</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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." :)  
        ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-get-xdqp-ssl-enabled" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>This function returns <code>true</code> if SSL is enabled for the
  group.  Otherwise, <code>false</code> is returned.
  </apidoc:summary>
  <apidoc:params>
   <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>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config,"Default")

  return
     admin:group-get-xdqp-ssl-enabled($config, $group)
 
  (: Returns 'true' if SSL is enabled for the Default group.  Otherwise, false. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-get-xdqp-ssl-allow-sslv3" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>This function returns <code>true</code> if the SSL v3 protocol 
  is enabled for the group.  Otherwise, <code>false</code> is returned.
  </apidoc:summary>
  <apidoc:params>
   <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>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config,"Default")

  return
     admin:group-get-xdqp-ssl-allow-sslv3($config, $group)

  (: Returns 'true' if the SSL v3 protocol is enabled for the Default group.  
     Otherwise, false. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-get-xdqp-ssl-allow-tls" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>This function returns <code>true</code> if the TLS protocol 
  is enabled for the group.  Otherwise, <code>false</code> is returned.
  </apidoc:summary>
  <apidoc:params>
   <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>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config,"Default")

  return
     admin:group-get-xdqp-ssl-allow-tls($config, $group)

  (: Returns 'true' if the TLS protocol is enabled for the Default group.  
     Otherwise, false. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-get-xdqp-ssl-ciphers" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>This function returns the SSL ciphers set for the group.
  </apidoc:summary>
  <apidoc:params>
   <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>
  </apidoc:params>
  <apidoc:return>xs:string</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config,"Default")

  return
     admin:group-get-xdqp-ssl-ciphers($config, $group)

  (: Returns the SSL cipher settings for the Default group. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-set-xdqp-ssl-enabled" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>This function enables or disables SSL for the group.</apidoc:summary>
  <apidoc:params>
   <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>
    <apidoc:param name="value" type="xs:boolean">
      Specify <code>true</code> to enable SSL for the group or <code>false</code> 
      to disable SSL. 
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config,"Default")

  return
        admin:group-set-xdqp-ssl-enabled($config, $group, fn:false()) 

  (: Disables SSL on the Default group. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-set-xdqp-ssl-allow-sslv3" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>This function enables or disables the SSL v3 protocol for the 
  specified group. </apidoc:summary>
  <apidoc:params>
   <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>
    <apidoc:param name="value" type="xs:boolean">
     Specify <code>true</code> to enable the SSL v3 protocol for the group or 
     <code>false</code> to disable the SSL v3 protocol. 
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config,"Default")

  return
        admin:group-set-xdqp-ssl-allow-sslv3($config, $group, fn:false())

  (: Disables the SSL v3 protocol on the Default group. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-set-xdqp-ssl-allow-tls" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>This function enables or disables the TLS protocol for the specified
  group. </apidoc:summary>
  <apidoc:params>
   <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>
    <apidoc:param name="value" type="xs:boolean">
    Specify <code>true</code> to enable the TLS protocol for the group or 
     <code>false</code> to disable the TLS protocol. 
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config,"Default")

  return
        admin:group-set-xdqp-ssl-allow-tls($config, $group, fn:true())

  (: Enables the TLS protocol on the Default group. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-set-xdqp-ssl-ciphers" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>This function sets SSL ciphers for the specified group. This is the 
  standard cipher specification string for OpenSSL. </apidoc:summary>
  <apidoc:params>
   <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>
    <apidoc:param name="value" type="xs:string">
    The SSL ciphers to set. 
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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 := admin:group-get-id($config,"Default")

  return
        admin:group-set-xdqp-ssl-ciphers($config, $group, "All") 

  (: Sets the ciphers for the Default group to "All".  :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-get-ssl-require-client-certificate" lib="admin" category="Admin Library" 
	bucket="XQuery Library Modules" subcategory="appserver">
  <apidoc:summary>This function returns true if a client certificate is required for the specified 
   App Server.  Otherwise, it returns false.
  </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.</apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:appserver-get-ssl-require-client-certificate($config, 
         admin:appserver-get-id($config,(), "Docs"))

  (: Returns true if a client certificate is required for the "Docs" App Server.  Otherwise, false.  :)
      ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-set-ssl-require-client-certificate" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
  <apidoc:summary>This function determines whether or not a client certificate is required for the 
  specified App Server. </apidoc:summary>
  <apidoc:params>
    <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="appserver-id" type="xs:unsignedLong">
        The ID of the App Server.  Typically, this is the result
        of an <code>admin:appserver-get-id</code> call.
    </apidoc:param>
    <apidoc:param name="value" type="xs:boolean">
    	A boolean value, <code>fn:true()</code> to enable, <code>fn:false()</code> to disable.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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. :)
      ]]></pre>
  </apidoc:example>
</apidoc:function>

<apidoc:function name="database-exists" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="database">
  <apidoc:summary>
  This function determines whether or not the specified database
  exists.  Returns <code>true</code> if the database exists, otherwise 
  <code>false</code> is returned.
  </apidoc:summary>
  <apidoc:params>
   <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="database-name" type="xs:string">
    The name of the database to check.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-exists($config, "Documents")

  (: Returns true if the Documents database exists. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
 
<apidoc:function name="forest-exists" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
  <apidoc:summary>
  This function determines whether or not the specified forest
  exists.  Returns <code>true</code> if the forest exists, otherwise 
  <code>false</code> is returned.
  </apidoc:summary>
  <apidoc:params>
   <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="forest-name" type="xs:string">
    The name of the forest to check.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-exists($config, "Documents")

  (: Returns true, if the Documents forest exists. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="forest-get-database" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
  <apidoc:summary>This function returns the ID of the database that uses the specified
  forest.
  </apidoc:summary>
  <apidoc:params>
   <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="forest-id" type="xs:unsignedLong">
     The id of the forest used by the database to be returned (for example, 
     <code>xdmp:forest("myForest")</code>).
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:unsignedLong?</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml"; 

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $forest := xdmp:forest("Documents")

  return admin:forest-get-database($config, $forest)

  (: Returns the ID of the database that uses the Documents forest. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="forest-get-replicas" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="forest">
  <apidoc:summary>
	  This function returns the IDs of the forest replicas for the 
	  specified forest.  If it returns the empty sequence, then
	  no replacas are assigned to the specified forest.
  </apidoc:summary>
  <apidoc:params>
   <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="forest-id" type="xs:unsignedLong">
	    The ID of the forest having the replica forests to 
	    be returned (for example, <code>xdmp:forest("myForest")</code>).
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:unsignedLong*</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml"; 

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $forest := xdmp:forest("Documents")

  return admin:forest-get-replicas($config, $forest)

  (: Returns the forest replicas associated with the Documents forest. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="forest-add-replica" lib="admin" 
	category="Admin Library" bucket="XQuery Library Modules" 
	subcategory="forest">
  <apidoc:summary>This function adds a forest replica to a master forest.
  </apidoc:summary>
  <apidoc:params>
   <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="master-id" type="xs:unsignedLong">
	    The ID of the master forest to which to add the replica forest
	    (for example, <code>xdmp:forest("MasterForest")</code>).
    </apidoc:param>
    <apidoc:param name="replica-id" type="xs:unsignedLong">
	    The ID of the replica forest to add to the master forest
	    (for example, <code>xdmp:forest("ReplicaForest")</code>).
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml"; 

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $forest := xdmp:forest("Documents")
  let $replica-forest := xdmp:forest("my-replica")

  return admin:forest-add-replica($config, $forest, $replica-forest)

  (: 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.  :)


    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="forest-remove-replica" lib="admin" 
	category="Admin Library" bucket="XQuery Library Modules" 
	subcategory="forest">
	<apidoc:summary>
		This function removes a forest replica from a master 
		forest.
	</apidoc:summary>
  <apidoc:params>
   <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="master-id" type="xs:unsignedLong">
	    The ID of the master forest from which to remove the replica forest
	    (for example, <code>xdmp:forest("MasterForest")</code>).
    </apidoc:param>
    <apidoc:param name="replica-id" type="xs:unsignedLong">
	    The ID of the replica forest to remove from the master forest 
	    (for example, <code>xdmp:forest("ReplicaForest")</code>).
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>element(configuration)</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml"; 

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $forest := xdmp:forest("failover1")
  let $replica-forest := xdmp:forest("replica1")

  return admin:forest-remove-replica($config, $forest, $replica-forest)

  (: 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.  :)

    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="host-exists" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="host">
  <apidoc:summary>
  This function determines whether or not the specified Host
  exists.  Returns <code>true</code> if the Host exists, otherwise 
  <code>false</code> is returned.
  </apidoc:summary>
  <apidoc:params>
   <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="host-name" type="xs:string">
    The name of the host to check.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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:host-exists($config, "hp6910-624v64b.marklogic.com")

  (: Returns true, if the specified host exists. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="appserver-exists" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="appserver">
  <apidoc:summary>This function determines whether or not the specified App Server
  exists.  Returns <code>true</code> if the App Server exists, otherwise 
  <code>false</code> is returned.
  </apidoc:summary>
  <apidoc:params>
   <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-ids" type="xs:unsignedLong*">
    The list of group IDs returned from the <code>admin:get-group-ids</code>
    function.
    </apidoc:param>
    <apidoc:param name="appserver-name" type="xs:string">
    The name of the App Server to check.
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  xquery version "1.0-ml"; 

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $groups := admin:get-group-ids($config) 

  return admin:appserver-exists($config, $groups, "Admin")

  (: Returns true, if the Admin App Server exists. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>
<apidoc:function name="group-exists" lib="admin" category="Admin Library" bucket="XQuery Library Modules" subcategory="group">
  <apidoc:summary>
  This function determines whether or not the specified Group
  exists.  Returns <code>true</code> if the Group exists, otherwise 
  <code>false</code> is returned.
  </apidoc:summary>
  <apidoc:params>
   <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-name" type="xs:string">
    The name of the group to check..
    </apidoc:param>
  </apidoc:params>
  <apidoc:return>xs:boolean</apidoc:return>
  <apidoc:example><pre xml:space="preserve"><![CDATA[
  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-exists($config, "Default")

  (: Returns true, if the Default group exists. :)
    ]]></pre>
  </apidoc:example>
</apidoc:function>

</apidoc:module>
