This page was generated
July  29,  2010
4:00  PM
XQuery Built-In and Modules Function Reference

Module: Admin Library - Database Functions

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.

Many of these functions provide new configuration information. In most cases, you must save the configuration (with admin:save-configuration, for example) in the same statement that you use the functions in order for them to take effect.

To use the Admin module as part of your own XQuery module, include the following line in your XQuery prolog:

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

The library namespace prefix admin is not predefined in the server.

Function Summary
admin:database-add-backup This function adds scheduled backup specifications for a database to a configuration.
admin:database-add-element-attribute-word-lexicon This function adds an element attribute word lexicon to the specified database in the configuration.
admin:database-add-element-word-lexicon This function adds an element word lexicon to the specified database in the configuration.
admin:database-add-element-word-query-through This function adds an element word query through to the specified database in the configuration.
admin:database-add-field This function adds the field specification to the specified database in the configuration.
admin:database-add-field-excluded-element This function adds the field excluded element specification in the specified database in the configuration.
admin:database-add-field-included-element This function adds the field included element specification tn the specified database in the configuration.
admin:database-add-field-word-lexicon This function adds a word lexicon to the specified database in the configuration.
admin:database-add-fragment-parent This function adds the specified fragment parent to the specified database in the configuration.
admin:database-add-fragment-root This function adds the specified fragment root to the specified database in the configuration.
admin:database-add-geospatial-element-attribute-pair-index This function adds a geospatial element attribute pair index to the specified database in the configuration.
admin:database-add-geospatial-element-child-index This function adds a geospatial element child index to the specified database in the configuration.
admin:database-add-geospatial-element-index This function adds a range element index to the specified database in the configuration.
admin:database-add-geospatial-element-pair-index This function adds a geospatial element pair index to the specified database in the configuration.
admin:database-add-merge-blackout This function adds a merge blackout specification for a database to a configuration.
admin:database-add-phrase-around This function adds a phrase around to the specified database in the configuration.
admin:database-add-phrase-through This function adds a phrase through to the specified database in the configuration.
admin:database-add-range-element-attribute-index This function adds a range element attribute index to the specified database in the configuration.
admin:database-add-range-element-index This function adds a range element index to the specified database in the configuration.
admin:database-add-word-lexicon This function adds a word lexicon to the specified database in the configuration.
admin:database-add-word-query-excluded-element This function adds the word query excluded element specification for the specified database to the configuration.
admin:database-add-word-query-included-element This function adds the word query included element specification to the specified database in the configuration.
admin:database-attach-forest This function attaches the specified forest to the specified database.
admin:database-copy This function creates a new database specification with the same settings as the database with the specified ID.
admin:database-create This function creates a new database specification.
admin:database-daily-backup This function constructs a daily scheduled database backup.
admin:database-delete This function deletes the configuration from the specified database(s).
admin:database-delete-backup This function deletes scheduled backup specifications for a database from a configuration.
admin:database-delete-element-attribute-word-lexicon This function deletes an element attribute word lexicon for the specified database from the configuration.
admin:database-delete-element-word-lexicon This function deletes an element word lexicon for the specified database from the configuration.
admin:database-delete-element-word-query-through This function deletes an element word query through for the specified database from the configuration.
admin:database-delete-field This function deletes the field specification in the specified database from the configuration.
admin:database-delete-field-excluded-element This function deletes the field excluded element specification in the specified database from the configuration.
admin:database-delete-field-included-element This function deletes the field included element specification in the specified database from the configuration.
admin:database-delete-field-word-lexicon This function deletes a word lexicon for the specified database from the configuration.
admin:database-delete-fragment-parent This function deletes the specified fragment parent in the specified database from the configuration.
admin:database-delete-fragment-root This function deletes the specified fragment root in the specified database from the configuration.
admin:database-delete-geospatial-element-attribute-pair-index This function deletes a geospatial element attribute pair index in the specified database from the configuration.
admin:database-delete-geospatial-element-child-index This function deletes a geospatial element child index for the specified database in the configuration.
admin:database-delete-geospatial-element-index This function deletes a geospatial element index for the specified database in the configuration.
admin:database-delete-geospatial-element-pair-index This function deletes a geospatial element pair index for the specified database from the configuration.
admin:database-delete-merge-blackout This function deletes a merge blackout specification for a database from a configuration.
admin:database-delete-phrase-around This function deletes a phrase around for the specified database from the configuration.
admin:database-delete-phrase-through This function deletes a phrase through for the specified database from the configuration.
admin:database-delete-range-element-attribute-index This function deletes a range element attribute index for the specified database in the configuration.
admin:database-delete-range-element-index This function deletes a range element index for the specified database in the configuration.
admin:database-delete-word-lexicon This function deletes a word lexicon for the specified database from the configuration.
admin:database-delete-word-query-excluded-element This function deletes the word query excluded element specification in the specified database from the configuration.
admin:database-delete-word-query-included-element This function deletes the word query included element specification in the specified database from the configuration.
admin:database-detach-forest This function detaches the specified forest from the specified database.
admin:database-element-attribute-word-lexicon This function constructs an element attribute word lexicon specification.
admin:database-element-word-lexicon This function constructs an element word lexicon specification.
admin:database-element-word-query-through This function constructs an element word query through specification.
admin:database-excluded-element This function constructs an excluded element specification.
admin:database-field This function constructs a field specification.
admin:database-fragment-parent This function constructs a fragment parent specification.
admin:database-fragment-root This function constructs a fragment root specification.
admin:database-geospatial-element-attribute-pair-index This function constructs a geospatial element attribute pair index specification.
admin:database-geospatial-element-child-index This function constructs a geospatial element child index specification.
admin:database-geospatial-element-index This function constructs a geospatial element index specification.
admin:database-geospatial-element-pair-index This function constructs a geospatial element pair index specification.
admin:database-get-attached-forests This function returns the attached forest IDs for the specified database from the configuration.
admin:database-get-attribute-value-positions This function returns the attribute value positions setting for the specified database from the configuration.
admin:database-get-backups This function returns the scheduled backups for the specified database from the configuration.
admin:database-get-collection-lexicon This function returns the collection lexicon setting for the specified database from the configuration.
admin:database-get-directory-creation This function returns the directory creation setting for the specified database from the configuration.
admin:database-get-element-attribute-word-lexicons This function returns the element attribute word lexicons specification(s) for the specified database from the configuration.
admin:database-get-element-value-positions This function returns the element value positions setting for the specified database from the configuration.
admin:database-get-element-word-lexicons This function returns the element word lexicons specification(s) for the specified database from the configuration.
admin:database-get-element-word-positions This function returns the element word positions setting for the specified database from the configuration.
admin:database-get-element-word-query-throughs This function returns the element word query throughs specification(s) for the specified database from the configuration.
admin:database-get-enabled This function returns the enabled value for the specified database from the configuration.
admin:database-get-expunge-locks This function returns the expunge locks setting for the specified database from the configuration.
admin:database-get-fast-case-sensitive-searches This function returns the fast case sensitive searches setting for the specified database from the configuration.
admin:database-get-fast-diacritic-sensitive-searches This function returns the fast diacritic sensitive searches setting for the specified database from the configuration.
admin:database-get-fast-element-character-searches This function returns the fast element character searches setting for the specified database from the configuration.
admin:database-get-fast-element-phrase-searches This function returns the fast element phrase searches setting for the specified database from the configuration.
admin:database-get-fast-element-trailing-wildcard-searches This function returns the trailing wildcard searches setting for the specified database from the configuration.
admin:database-get-fast-element-word-searches This function returns the fast element word searches setting for the specified database from the configuration.
admin:database-get-fast-phrase-searches This function returns the fast phrase searches setting for the specified database from the configuration.
admin:database-get-fast-reverse-searches This function returns the fast reverse searches setting for the specified database from the configuration.
admin:database-get-field This function returns the field specification for the specified database from the configuration.
admin:database-get-field-excluded-elements This function returns the field excluded elements specification for the specified database from the configuration.
admin:database-get-field-fast-case-sensitive-searches This function returns true if the fast case sensitive searches setting for the specified field is enabled.
admin:database-get-field-fast-diacritic-sensitive-searches This function returns true if the fast diacritic sensitive searches setting for the specified field is enabled.
admin:database-get-field-fast-phrase-searches This function returns true if the fast phrase searches setting for the specified field is enabled.
admin:database-get-field-include-document-root This function returns the field include document root setting for the specified field from the configuration.
admin:database-get-field-included-elements This function returns the fields included elements specification for the specified database from the configuration.
admin:database-get-field-one-character-searches This function returns true if the one character searches setting for the specified field is enabled.
admin:database-get-field-stemmed-searches This function returns stemmed searches setting for the specified field if configured.
admin:database-get-field-three-character-searches This function returns true if the three character searches setting for the specified field is enabled.
admin:database-get-field-three-character-word-positions This function returns true if the three character word positions setting for the specified field is enabled.
admin:database-get-field-trailing-wildcard-searches This function returns true if the trailing wildcard searches setting for the specified field is enabled.
admin:database-get-field-trailing-wildcard-word-positions This function returns true if the trailing wildcard word positions setting for the specified field is enabled.
admin:database-get-field-two-character-searches This function returns true if the two character searches setting for the specified field is enabled.
admin:database-get-field-word-lexicons This function returns the word lexicons specification(s) for the specified database from the configuration.
admin:database-get-field-word-searches This function returns true if the word searches setting for the specified field is enabled.
admin:database-get-fields This function returns the fields specification(s) for the specified database from the configuration.
admin:database-get-format-compatibility This function returns the format compatibility setting for the specified database from the configuration.
admin:database-get-fragment-parents This function returns the fragment parents specification for the specified database from the configuration.
admin:database-get-fragment-roots This function returns the fragment roots specification for the specified database from the configuration.
admin:database-get-geospatial-element-attribute-pair-indexes This function returns the geospatial element attribute pair indexes specification(s) for the specified database from the configuration.
admin:database-get-geospatial-element-child-indexes This function returns the geospatial element child indexes specification(s) for the specified database from the configuration.
admin:database-get-geospatial-element-indexes This function returns the geospatial element indexes specification(s) for the specified database from the configuration.
admin:database-get-geospatial-element-pair-indexes This function returns the geospatial element pair indexes specification(s) for the specified database from the configuration.
admin:database-get-id This function returns the ID for the specified database from the configuration.
admin:database-get-in-memory-limit This function returns the in memory limit setting for the specified database from the configuration.
admin:database-get-in-memory-list-size This function returns the im memory list size setting for the specified database from the configuration.
admin:database-get-in-memory-range-index-size This function returns the in memory range index size setting for the specified database from the configuration.
admin:database-get-in-memory-reverse-index-size This function returns the in memory reverse index size setting for the specified database from the configuration.
admin:database-get-in-memory-tree-size This function returns the in memory tree size setting for the specified database from the configuration.
admin:database-get-index-detection This function returns the index detection setting for the specified database from the configuration.
admin:database-get-inherit-collections This function returns the inherit collections setting for the specified database from the configuration.
admin:database-get-inherit-permissions This function returns the inherit positions setting for the specified database from the configuration.
admin:database-get-inherit-quality This function returns the inherit quality setting for the specified database from the configuration.
admin:database-get-journal-size This function returns the journal size setting for the specified database from the configuration.
admin:database-get-language This function returns the language for the specified database from the configuration.
admin:database-get-maintain-directory-last-modified This function returns the maintain directory last modified setting for the specified database from the configuration.
admin:database-get-maintain-last-modified This function returns the maintain last modified setting for the specified database from the configuration.
admin:database-get-merge-blackouts This function returns the merge blackouts specification for the specified database from the configuration.
admin:database-get-merge-enable This function returns the merge enable setting for the specified database from the configuration.
admin:database-get-merge-max-size This function returns the merge max size setting for the specified database from the configuration.
admin:database-get-merge-min-ratio This function returns the merge min ratio setting for the specified database from the configuration.
admin:database-get-merge-min-size This function returns the merge min size setting for the specified database from the configuration.
admin:database-get-merge-timestamp This function returns the merge timestamp setting for the specified database from the configuration.
admin:database-get-name This function returns the name for the specified database from the configuration.
admin:database-get-one-character-searches This function returns the one character searches setting for the specified database from the configuration.
admin:database-get-phrase-arounds This function returns the phrase arounds specification(s) for the specified database from the configuration.
admin:database-get-phrase-throughs This function returns the phrase throughs specification(s) for the specified database from the configuration.
admin:database-get-positions-list-max-size This function returns the positions list max size setting for the specified database from the configuration.
admin:database-get-preallocate-journals This function returns the preallocate journals setting for the specified database from the configuration.
admin:database-get-preload-mapped-data This function returns the preload mapped data setting for the specified database from the configuration.
admin:database-get-range-element-attribute-indexes This function returns the range element attribute indexes specification(s) for the specified database from the configuration.
admin:database-get-range-element-indexes This function returns the range element indexes specification(s) for the specified database from the configuration.
admin:database-get-reindexer-enable This function returns the reindexer enable setting for the specified database from the configuration.
admin:database-get-reindexer-throttle This function returns the reindexer throttle setting for the specified database from the configuration.
admin:database-get-reindexer-timestamp This function returns the reindexer timestamp setting for the specified database from the configuration.
admin:database-get-schema-database This function returns the ID of the schema database for the specified database from the configuration.
admin:database-get-security-database This function returns the ID of the security database for the specified database from the configuration.
admin:database-get-stemmed-searches This function returns the stemmed searches setting for the specified database from the configuration.
admin:database-get-three-character-searches This function returns the three character searches setting for the specified database from the configuration.
admin:database-get-three-character-word-positions This function returns the three character word positions setting for the specified database from the configuration.
admin:database-get-trailing-wildcard-searches This function returns the trailing wildcard searches setting for the specified database from the configuration.
admin:database-get-trailing-wildcard-word-positions This function returns the trailing wildcard word positions setting for the specified database from the configuration.
admin:database-get-triggers-database This function returns the ID of the triggers database for the specified database from the configuration.
admin:database-get-two-character-searches This function returns the two character searches setting for the specified database from the configuration.
admin:database-get-uri-lexicon This function returns the URI lexicon setting for the specified database from the configuration.
admin:database-get-word-lexicons This function returns the word lexicons specification(s) for the specified database from the configuration.
admin:database-get-word-positions This function returns the word positions setting for the specified database from the configuration.
admin:database-get-word-query-excluded-elements This function returns the word query excluded elements setting for the specified database from the configuration.
admin:database-get-word-query-fast-case-sensitive-searches This function returns true if the word query fast case sensitive searches setting is enabled for the specified database in the configuration.
admin:database-get-word-query-fast-diacritic-sensitive-searches This function returns true if the word query fast diacritic sensitive searches setting is enabled for the specified database in the configuration.
admin:database-get-word-query-fast-phrase-searches This function returns true if the word query fast phrase searches setting for the specified database is set in the configuration.
admin:database-get-word-query-include-document-root This function returns the word query include document root setting for the specified database from the configuration.
admin:database-get-word-query-included-elements This function returns the word query included elements setting for the specified database from the configuration.
admin:database-get-word-query-one-character-searches This function returns true if the word query one character searches setting is enabled for the specified database in the configuration.
admin:database-get-word-query-stemmed-searches This function returns the reindexer word query stemmed searches setting for the specified database from the configuration.
admin:database-get-word-query-three-character-searches This function returns true if the word query three character searches setting is enabled for the specified database in the configuration.
admin:database-get-word-query-three-character-word-positions This function returns true if the word query three character word positions setting is enabled for the specified database from the configuration.
admin:database-get-word-query-trailing-wildcard-searches This function returns true if the word query trailing wildcard searches setting is enabled for the specified database in the configuration.
admin:database-get-word-query-trailing-wildcard-word-positions This function returns true if the word query trailing wildcard word positions setting is enabled for the specified database in the configuration.
admin:database-get-word-query-two-character-searches This function returns true if the word query two character searches setting is enabled for the specified database in the configuration.
admin:database-get-word-query-word-searches This function returns true if the word query searches setting for the specified database is enabled in the configuration.
admin:database-get-word-searches This function returns the word searches setting for the specified database from the configuration.
admin:database-hourly-backup This function constructs a hourly scheduled database backup.
admin:database-included-element This function constructs an included element specification.
admin:database-minutely-backup This function constructs a scheduled database backup on a number-of-minutes basis.
admin:database-monthly-backup This function constructs a monthly scheduled backup.
admin:database-one-time-backup This function constructs a one-time backup.
admin:database-one-time-merge-blackout This function constructs a one-time merge-blackout specification.
admin:database-phrase-around This function constructs a phrase through specification.
admin:database-phrase-through This function constructs a phrase through specification.
admin:database-range-element-attribute-index This function constructs a range element attribute index specification.
admin:database-range-element-index This function constructs a range element index specification.
admin:database-recurring-merge-blackout This function constructs a merge-blackout specification.
admin:database-set-attribute-value-positions This function sets the attribute value positions setting for the specified database in the configuration.
admin:database-set-collection-lexicon This function sets the collection lexicon setting for the specified database in the configuration.
admin:database-set-directory-creation This function sets the directory creation setting for the specified database in the configuration.
admin:database-set-element-value-positions This function sets the element value positions setting for the specified database in the configuration.
admin:database-set-element-word-positions This function sets the element word positions setting for the specified database in the configuration.
admin:database-set-enabled This function sets the enabled value for the specified database in the configuration.
admin:database-set-expunge-locks This function sets the expunge locks setting for the specified database in the configuration.
admin:database-set-fast-case-sensitive-searches This function sets the fast case sensitive searches setting for the specified database in the configuration.
admin:database-set-fast-diacritic-sensitive-searches This function sets the fast diacritic-sensitive searches setting for the specified database in the configuration.
admin:database-set-fast-element-character-searches This function sets the fast element character searches setting for the specified database in the configuration.
admin:database-set-fast-element-phrase-searches This function sets the fast element phrase searches setting for the specified database in the configuration.
admin:database-set-fast-element-trailing-wildcard-searches This function sets the fast element trailing wildcard searches setting for the specified database in the configuration.
admin:database-set-fast-element-word-searches This function sets the element word searches setting for the specified database in the configuration.
admin:database-set-fast-phrase-searches This function sets the fast phrase searches setting for the specified database in the configuration.
admin:database-set-fast-reverse-searches This function sets the fast reverse searches setting for the specified database in the configuration.
admin:database-set-field-fast-case-sensitive-searches This function sets the field fast case sensitive searches setting for the specified field in the configuration.
admin:database-set-field-fast-diacritic-sensitive-searches This function sets the field fast diacritic sensitive searches setting for the specified field in the configuration.
admin:database-set-field-fast-phrase-searches This function sets the field fast phrase searches setting for the specified field in the configuration.
admin:database-set-field-include-document-root This function sets the field include document root setting for the specified field in the configuration.
admin:database-set-field-name This function sets the field name setting for the specified field in the configuration.
admin:database-set-field-one-character-searches This function sets the field one character searches setting for the specified field in the configuration.
admin:database-set-field-stemmed-searches This function sets the field stemmed searches setting for the specified field in the configuration.
admin:database-set-field-three-character-searches This function sets the field three character searches setting for the specified field in the configuration.
admin:database-set-field-three-character-word-positions This function sets the field three character word positions setting for the specified field in the configuration.
admin:database-set-field-trailing-wildcard-searches This function sets the field trailing wildcard searches setting for the specified database in the configuration.
admin:database-set-field-trailing-wildcard-word-positions This function sets the field trailing wildcard word positions setting for the specified field in the configuration.
admin:database-set-field-two-character-searches This function sets the field two character searches setting for the specified field in the configuration.
admin:database-set-field-word-searches This function sets the field word searches setting for the specified field in the configuration.
admin:database-set-format-compatibility This function sets the format cpmpatibility setting for the specified database in the configuration.
admin:database-set-in-memory-limit This function sets the in-memory limit setting for the specified database in the configuration.
admin:database-set-in-memory-list-size This function sets the in-memory list size setting for the specified database in the configuration.
admin:database-set-in-memory-range-index-size This function sets the in-memory range index size setting for the specified database in the configuration.
admin:database-set-in-memory-reverse-index-size This function sets the in-memory range reverse index size setting for the specified database in the configuration.
admin:database-set-in-memory-tree-size This function sets the in-memory tree size setting for the specified database in the configuration.
admin:database-set-index-detection This function sets the index detection setting for the specified database in the configuration.
admin:database-set-inherit-collections This function sets the inherit collections setting for the specified database in the configuration.
admin:database-set-inherit-permissions This function sets the inherit permissions setting for the specified database in the configuration.
admin:database-set-inherit-quality This function sets the inherit quality setting for the specified database in the configuration.
admin:database-set-journal-size This function sets the journal size setting for the specified database in the configuration.
admin:database-set-language This function sets the language for the specified database in the configuration.
admin:database-set-maintain-directory-last-modified This function sets the maintain directory last modified setting for the specified database in the configuration.
admin:database-set-maintain-last-modified This function sets the maintain last modified setting for the specified database in the configuration.
admin:database-set-merge-enable This function sets the merge enable setting for the specified database in the configuration.
admin:database-set-merge-max-size This function sets the merge max size setting for the specified database in the configuration.
admin:database-set-merge-min-ratio This function sets the merge min ratio setting for the specified database in the configuration.
admin:database-set-merge-min-size This function sets the merge minimum size setting for the specified database in the configuration.
admin:database-set-merge-timestamp This function sets the merge timestamp setting for the specified database in the configuration.
admin:database-set-name This function changes the name of the database with the specified ID to the specified name.
admin:database-set-one-character-searches This function sets the one character searches setting for the specified database in the configuration.
admin:database-set-positions-list-max-size This function sets the positions list max size setting for the specified database in the configuration.
admin:database-set-preallocate-journals This function sets the preallocate journals setting for the specified database in the configuration.
admin:database-set-preload-mapped-data This function sets the preload mapped data setting for the specified database in the configuration.
admin:database-set-reindexer-enable This function sets the reindexer enable setting for the specified database in the configuration.
admin:database-set-reindexer-throttle This function sets the reindexer throttle setting for the specified database in the configuration.
admin:database-set-reindexer-timestamp This function sets the reindexer timestamp setting for the specified database in the configuration.
admin:database-set-schema-database This function sets the schema database for a database to the specified database in the configuration.
admin:database-set-security-database This function sets the security database for a database to the specified database in the configuration.
admin:database-set-stemmed-searches This function sets the stemmed searches setting for the specified database in the configuration.
admin:database-set-three-character-searches This function sets the three character searches setting for the specified database in the configuration.
admin:database-set-three-character-word-positions This function sets the three character word positions setting for the specified database in the configuration.
admin:database-set-trailing-wildcard-searches This function sets the trailing wildcard searches setting for the specified database in the configuration.
admin:database-set-trailing-wildcard-word-positions This function sets the trailing wildcard word positions setting for the specified database in the configuration.
admin:database-set-triggers-database This function sets the triggers database to the specified database ID for the specified database in the configuration.
admin:database-set-two-character-searches This function sets the two character searches setting for the specified database in the configuration.
admin:database-set-uri-lexicon This function sets the URI lexicon setting for the specified database in the configuration.
admin:database-set-word-positions This function sets the word positions setting for the specified database in the configuration.
admin:database-set-word-query-fast-case-sensitive-searches This function returns the word query fast case sensitive searches setting for the specified database from the configuration.
admin:database-set-word-query-fast-diacritic-sensitive-searches This function sets the word query fast diacritic sensitive searches setting for the specified database in the configuration.
admin:database-set-word-query-fast-phrase-searches This function sets the word query fast phrase searches setting for the specified database in the configuration.
admin:database-set-word-query-include-document-root This function sets the word query include document root setting for the specified field in the configuration.
admin:database-set-word-query-one-character-searches This function sets the word query one character searches setting for the specified field in the configuration.
admin:database-set-word-query-stemmed-searches This function sets the word query stemmed searches setting for the specified database in the configuration.
admin:database-set-word-query-three-character-searches This function sets the word query three character searches setting for the specified database in the configuration.
admin:database-set-word-query-three-character-word-positions This function sets the word query three character word positions setting for the specified database in the configuration.
admin:database-set-word-query-trailing-wildcard-searches This function sets the word query trailing wildcard searches setting for the specified database in the configuration.
admin:database-set-word-query-trailing-wildcard-word-positions This function sets the word query trailing wildcard word positions setting for the specified database in the configuration.
admin:database-set-word-query-two-character-searches This function sets the word query two character searches setting for the specified database in the configuration.
admin:database-set-word-query-word-searches This function sets the word query word searches setting for the specified database in the configuration.
admin:database-set-word-searches This function sets the word searches setting for the specified database in the configuration.
admin:database-weekly-backup This function constructs a weekly scheduled backup.
admin:database-word-lexicon This function constructs a word lexicon specification.
admin:get-database-ids This function returns all the database IDs from the configuration.
Function Detail
admin:database-add-backup(
$config as element(configuration),
$database-id as xs:unsignedLong,
$backups as element(db:database-backup)*
)  as   element(configuration)
Summary:

This function adds scheduled backup specifications for a database to a configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("mydatabase")).
$backups : The scheduled backup specification(s), typically the result of an admin:database-one-time-backup or an admin:database-monthly-backup or an admin:database-weekly-backup call

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $database := xdmp:database("mydatabase")
  let $backup := admin:database-one-time-backup("/backup-dir",  
        xs:dateTime("2008-02-14T09:45:00"))
  return
  admin:database-add-backup($config, $database, $backup)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-element-attribute-word-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong,
$element-attribute-word-lexicons as element(db:element-attribute-word-lexicon)*
)  as   element(configuration)
Summary:

This function adds an element attribute word lexicon to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$element-attribute-word-lexicons : An element word lexicon specification, typically the result of an admin:database-element-word-lexicon call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $lexspec := admin:database-element-attribute-word-lexicon("my/namepsace", 
     "elementname", "", "myAttribute", "http://marklogic.com/collation/" )
  return
  admin:database-add-element-attribute-word-lexicon($config, $dbid, $lexspec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-element-word-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong,
$element-word-lexicons as element(db:element-word-lexicon)*
)  as   element(configuration)
Summary:

This function adds an element word lexicon to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$element-word-lexicons : An element word lexicon specification, typically the result of an admin:database-element-word-lexicon call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $lexspec := admin:database-element-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.  :)  
  

admin:database-add-element-word-query-through(
$config as element(configuration),
$database-id as xs:unsignedLong,
$element-word-query-throughs as element(db:element-word-query-through)*
)  as   element(configuration)
Summary:

This function adds an element word query through to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$element-word-query-throughs : An element word query through specification, typically the result of an admin:database-element-word-query-through call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-add-field(
$config as element(configuration),
$database-id as xs:unsignedLong,
$fields as element(db:field)*
)  as   element(configuration)
Summary:

This function adds the field specification to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$fields : The field specification, typically the result of an admin:admin:database-field call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $fieldspec := admin:database-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.  :)  
  

admin:database-add-field-excluded-element(
$config as element(configuration),
$database-id as xs:unsignedLong,
$field-name as xs:string,
$excluded-elements as element(db:excluded-element)*
)  as   element(configuration)
Summary:

This function adds the field excluded element specification in the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$field-name : The name of the field.
$excluded-elements : The excluded elements specification, typically the result of an admin:database-excluded-element call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $fieldspec := admin:database-excluded-element("http://myuri/namespace", 
	"element-name")
  return
  admin:database-add-field-excluded-element($config, $dbid, 
       "myField", $fieldspec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-field-included-element(
$config as element(configuration),
$database-id as xs:unsignedLong,
$field-name as xs:string,
$included-elements as element(db:included-element)*
)  as   element(configuration)
Summary:

This function adds the field included element specification tn the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$field-name : The name of the field.
$included-elements : The included elements specification, typically the result of an admin:database-included-element call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $fieldspec :=   admin:database-included-element("http://myuri/namespace", 
  "element-name", 1.0, "", "myAttribute", "some value")
  return
  admin:database-add-field-included-element($config, $dbid, 
       "myField", $fieldspec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-field-word-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong,
$field-name as xs:string,
$word-lexicons as element(db:word-lexicon)*
)  as   element(configuration)
Summary:

This function adds a word lexicon to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$field-name : The name of the field.
$word-lexicons : A word lexicon specification, typically the result of an admin:database-word-lexicon call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $lexspec := admin:database-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.  :)  
  

admin:database-add-fragment-parent(
$config as element(configuration),
$database-id as xs:unsignedLong,
$fragment-parents as element(db:fragment-parent)*
)  as   element(configuration)
Summary:

This function adds the specified fragment parent to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$fragment-parents : A fragment parent specification, typically the result of an admin:database-fragment-parent call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-add-fragment-root(
$config as element(configuration),
$database-id as xs:unsignedLong,
$fragment-roots as element(db:fragment-root)*
)  as   element(configuration)
Summary:

This function adds the specified fragment root to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$fragment-roots : A fragment root specification, typically the result of an admin:database-fragment-root call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-add-geospatial-element-attribute-pair-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$geospatial-element-attribute-pair-indexes as element(db:geospatial-element-attribute-pair-index)*
)  as   element(configuration)
Summary:

This function adds a geospatial element attribute pair index to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$geospatial-element-attribute-pair-indexes : A geospatial element attribute pair index specification, typically the result of an admin:database-geospatial-element-attribute-pair-index call.

Example:
  xquery version "1.0-ml";

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

  let $config :=  admin:get-configuration()
  let $geospec := admin:database-geospatial-element-attribute-pair-index(
	  "/my/namespace", "elementname", "/my/namespace", "lat", 
	  "/my/namespace", "long", "wgs84", fn:false() )
  return
  admin:database-add-geospatial-element-attribute-pair-index($config, 
     xdmp:database("myDatabase"), $geospec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-geospatial-element-child-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$geospatial-element-child-indexes as element(db:geospatial-element-child-index)*
)  as   element(configuration)
Summary:

This function adds a geospatial element child index to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$geospatial-element-child-indexes : A geospatial element child index specification, typically the result of an admin:database-geospatial-element-child-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $geospec := admin:database-geospatial-element-child-index("/my/namespace",
          "elementname", "/my/namespace", "child-element", 
          "wgs84", fn:false() )
  return
  admin:database-add-geospatial-element-child-index($config, $dbid, $geospec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-geospatial-element-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$geospatial-element-indexes as element(db:geospatial-element-index)*
)  as   element(configuration)
Summary:

This function adds a range element index to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$geospatial-element-indexes : A geospatial element index specification, typically the result of an admin:database-geospatial-element-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $geospec := admin:database-geospatial-element-index("/my/namespace",
                "elementname", "wgs84", fn:false() )
  return
  admin:database-add-geospatial-element-index($config, $dbid, $geospec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-geospatial-element-pair-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$geospatial-element-pair-indexes as element(db:geospatial-element-pair-index)*
)  as   element(configuration)
Summary:

This function adds a geospatial element pair index to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$geospatial-element-pair-indexes : A geospatial element pair index specification, typically the result of an admin:database-geospatial-element-pair-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config :=  admin:get-configuration()
  let $geospec :=  admin:database-geospatial-element-pair-index("/my/namespace",
          "elementname", "/my/namespace", "lat", 
	  "/my/namespace", "long", "wgs84", fn:false() )
  return
  admin:database-add-geospatial-element-pair-index($config, 
     xdmp:database("myDatabase"), $geospec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-merge-blackout(
$config as element(configuration),
$database-id as xs:unsignedLong,
$merge-blackouts as element(db:merge-blackout)*
)  as   element(configuration)
Summary:

This function adds a merge blackout specification for a database to a configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$merge-blackouts : The merge blackout specification(s), typically the result of an admin:database-one-time-merge-blackout or an admin:database-recurring-merge-blackout call

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $mergespec := admin:database-one-time-merge-blackout(500,  
        xs:dateTime("2008-02-14T09:45:00"), 
        (), xs:dayTimeDuration("PT3H") )
  return
  admin:database-add-merge-blackout($config, $dbid, $mergespec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-phrase-around(
$config as element(configuration),
$database-id as xs:unsignedLong,
$phrase-arounds as element(db:phrase-around)*
)  as   element(configuration)
Summary:

This function adds a phrase around to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$phrase-arounds : A phrase around specification, typically the result of an admin:database-phrase-around call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-add-phrase-through(
$config as element(configuration),
$database-id as xs:unsignedLong,
$phrase-throughs as element(db:phrase-through)*
)  as   element(configuration)
Summary:

This function adds a phrase through to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$phrase-throughs : A phrase through specification, typically the result of an admin:database-phrase-through call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-add-range-element-attribute-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$attribute-indexes as element(db:range-element-attribute-index)*
)  as   element(configuration)
Summary:

This function adds a range element attribute index to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$attribute-indexes : An element attribute range index specification, typically the result of an admin:database-range-element-attribute-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $rangespec := admin:database-range-element-attribute-index("string", 
       "/my/namespace", "elementname", "", "myAttribute", 
       "http://marklogic.com/collation/", fn:false() )
  return
  admin:database-add-range-element-attribute-index($config, $dbid, $rangespec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-range-element-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$range-indexes as element(db:range-element-index)*
)  as   element(configuration)
Summary:

This function adds a range element index to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$range-indexes : An element range index specification, typically the result of an admin:database-range-element-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $rangespec := admin:database-range-element-index("string", "/my/namespace",
                "elementname", "http://marklogic.com/collation/",
		fn:false() )
  return
  admin:database-add-range-element-index($config, $dbid, $rangespec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-add-word-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong,
$word-lexicons as element(db:word-lexicon)*
)  as   element(configuration)
Summary:

This function adds a word lexicon to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$word-lexicons : A word lexicon specification, typically the result of an admin:database-word-lexicon call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $lexspec := admin:database-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.  :)  
  

admin:database-add-word-query-excluded-element(
$config as element(configuration),
$database-id as xs:unsignedLong,
$excluded-elements as element(db:excluded-element)*
)  as   element(configuration)
Summary:

This function adds the word query excluded element specification for the specified database to the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$excluded-elements : The excluded elements specification, typically the result of an admin:database-excluded-element call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $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.  :)  
  

admin:database-add-word-query-included-element(
$config as element(configuration),
$database-id as xs:unsignedLong,
$included-elements as element(db:included-element)*
)  as   element(configuration)
Summary:

This function adds the word query included element specification to the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$included-elements : The included elements specification, typically the result of an admin:database-included-element call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $wqspec :=   admin:database-included-element("http://myuri/namespace", 
  "element-name", 1.0, "", "myAttribute", "some value")
  return
  admin:database-add-word-query-included-element($config, $dbid, $wqspec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-attach-forest(
$config as element(configuration),
$database-id as xs:unsignedLong,
$forest-id as xs:unsignedLong
)  as   element(configuration)
Summary:

This function attaches the specified forest to the specified database.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$forest-id : The ID of the forest. For example, xdmp:forest("myForest") specified the ID for a forest named "myForest".

Usage Notes:

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.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-attach-forest($config, xdmp:database("myDatabase"),
      xdmp:forest("myForest") )
  

admin:database-copy(
$config as element(configuration),
$database-id as xs:unsignedLong,
$database-name as xs:string
)  as   element(configuration)
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.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database to copy (for example, xdmp:database("myDatabase")).
$database-name : The name of the new database to create.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-copy($config, xdmp:database("myOldDatabase"), 
                    "myNewDatabase")

   => Creates a configuration with a new database specification 
      having the same settings as the database named "myOldDatabase".
  

admin:database-create(
$config as element(configuration),
$database-name as xs:string,
$security-db as xs:unsignedLong,
$schema-db as xs:unsignedLong
)  as   element(configuration)
Summary:

This function creates a new database specification.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-name : The name the database to create. The name must not be used by any other database in the cluster.
$security-db : The ID of the security database (for example, xdmp:database("Security") used by this database.
$schema-db : The ID of the schemas database (for example, xdmp:database("Schemas") used by this database.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-create($config, "myNewDatabase", 
        xdmp:database("Security"), xdmp:database("Schemas"))
  

admin:database-daily-backup(
$backup-dir as xs:string,
$backup-period as xs:positiveInteger,
$start-time as xs:time,
$max-backups as xs:unsignedLong,
$backup-security-db as xs:boolean,
$backup-schemas-db as xs:boolean,
$backup-triggers-db as xs:boolean
)  as   element(db:database-backup)
Summary:

This function constructs a daily scheduled database backup.

Parameters:
$backup-dir : The directory to save the backup.
$backup-period : The number of days to elapse between each backup
$start-time : The time of day of the backup, in 24:00:00 notation.
$max-backups : The maximum number of backups to keep. When you reach the specified maximum number of backups, the next backup will delete the oldest backup. Specify 0 to keep an unlimited number of backups.
$backup-security-db : Whether to backup the security database alongside the current backup.
$backup-schemas-db : Whether to backup the schemas database alongside the current backup.
$backup-triggers-db : Whether to backup the triggers database alongside the current backup.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
   admin:database-daily-backup("/backup-dir", 2,
      xs:time("19:45:00"),10,true(),true(),true())

  (: returns the daily database backup specification :)
   

admin:database-delete(
$config as element(configuration),
$database-ids as xs:unsignedLong*
)  as   element(configuration)
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).

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-ids : The id(s) for the specified database(s) (for example, xdmp:database("myDatabase")).

Usage Notes:

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.

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-delete($config, admin:database-get-id($config, "foo"))

  => The new configuration with the specified databases removed.
     Use admin:save-configuration to save these changes. 
  

admin:database-delete-backup(
$config as element(configuration),
$database-id as xs:unsignedLong,
$backups as element(db:database-backup)*
)  as   element(configuration)
Summary:

This function deletes scheduled backup specifications for a database from a configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("mydatabase")).
$backups : The scheduled backup(s) to delete. Typically, the result of an admin:database-get-backups call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config  := admin:get-configuration()
  let $dbid  := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-delete-element-attribute-word-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong,
$lexicons as element(db:element-attribute-word-lexicon)*
)  as   element(configuration)
Summary:

This function deletes an element attribute word lexicon for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$lexicons : An element attribute word lexicon specification, typically the result of an admin:database-element-attribute-word-lexicon call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $lexspec := admin:database-element-attribute-word-lexicon("my/namepsace", 
     "elementname", "", "myAttribute", "http://marklogic.com/collation/" )
  return
  admin:database-delete-element-attribute-word-lexicon($config, $dbid, $lexspec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-element-word-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong,
$element-word-lexicons as element(db:element-word-lexicon)*
)  as   element(configuration)
Summary:

This function deletes an element word lexicon for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$element-word-lexicons : An element word lexicon specification, typically the result of an admin:database-element-word-lexicon call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $lexspec := admin:database-element-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.  :)  
  

admin:database-delete-element-word-query-through(
$config as element(configuration),
$database-id as xs:unsignedLong,
$throughs as element(db:element-word-query-through)*
)  as   element(configuration)
Summary:

This function deletes an element word query through for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$throughs : An element word query through specification, typically the result of an admin:database-element-word-query-through call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-delete-field(
$config as element(configuration),
$database-id as xs:unsignedLong,
$field-names as xs:string*
)  as   element(configuration)
Summary:

This function deletes the field specification in the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$field-names : The name(s) of the field(s) to delete.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  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.  :)  
  

admin:database-delete-field-excluded-element(
$config as element(configuration),
$database-id as xs:unsignedLong,
$field-name as xs:string,
$excluded-elements as element(db:excluded-element)*
)  as   element(configuration)
Summary:

This function deletes the field excluded element specification in the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$field-name : The name of the field.
$excluded-elements : The excluded elements specification, typically the result of an admin:database-excluded-element call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $fieldspec := admin:database-excluded-element("http://myuri/namespace", 
	"element-name")
  return
  admin:database-delete-field-excluded-element($config, $dbid, 
       "myField", $fieldspec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-field-included-element(
$config as element(configuration),
$database-id as xs:unsignedLong,
$field-name as xs:string,
$included-elements as element(db:included-element)*
)  as   element(configuration)
Summary:

This function deletes the field included element specification in the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$field-name : The name of the field.
$included-elements : The included elements specification, typically the result of an admin:database-included-element call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $fieldspec :=   admin:database-included-element("http://myuri/namespace", 
  "element-name", 1.0, "", "myAttribute", "some value")
  return
  admin:database-delete-field-included-element($config, $dbid, 
       "myField", $fieldspec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-field-word-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong,
$field-name as xs:string,
$word-lexicons as element(db:word-lexicon)*
)  as   element(configuration)
Summary:

This function deletes a word lexicon for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$field-name : The name of the field.
$word-lexicons : A word lexicon specification, typically the result of an admin:database-word-lexicon call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $lexspec := admin:database-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.  :)  
  

admin:database-delete-fragment-parent(
$config as element(configuration),
$database-id as xs:unsignedLong,
$fragment-parents as element(db:fragment-parent)*
)  as   element(configuration)
Summary:

This function deletes the specified fragment parent in the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$fragment-parents : A fragment parent specification, typically the result of an admin:database-fragment-parent call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-delete-fragment-root(
$config as element(configuration),
$database-id as xs:unsignedLong,
$fragment-roots as element(db:fragment-root)*
)  as   element(configuration)
Summary:

This function deletes the specified fragment root in the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$fragment-roots : A fragment root specification, typically the result of an admin:database-fragment-root call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-delete-geospatial-element-attribute-pair-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$indexes as element(db:geospatial-element-attribute-pair-index)*
)  as   element(configuration)
Summary:

This function deletes a geospatial element attribute pair index in the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$indexes : A geospatial element attribute pair index specification, typically the result of an admin:database-geospatial-element-attribute-pair-index call.

Example:
  xquery version "1.0-ml";

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

  let $config :=  admin:get-configuration()
  let $geospec := admin:database-geospatial-element-attribute-pair-index(
	  "/my/namespace", "elementname", "/my/namespace", "lat", 
	  "/my/namespace", "long", "wgs84", fn:false() )
  return
  admin:database-delete-geospatial-element-pair-index($config, 
     xdmp:database("myDatabase"), $geospec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-geospatial-element-child-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$geospatial-element-child-indexes as element(db:geospatial-element-child-index)*
)  as   element(configuration)
Summary:

This function deletes a geospatial element child index for the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$geospatial-element-child-indexes : A geospatial element child index specification, typically the result of an admin:database-geospatial-element-child-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $geospec := admin:database-geospatial-element-child-index("/my/namespace",
        "elementname", "/my/namespace", "child-element", "wgs84", fn:false() )
  return
  admin:database-delete-geospatial-element-child-index($config, $dbid, $geospec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-geospatial-element-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$geospatial-element-indexes as element(db:geospatial-element-index)*
)  as   element(configuration)
Summary:

This function deletes a geospatial element index for the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$geospatial-element-indexes : A geospatial element index specification, typically the result of an admin:database-geospatial-element-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $geospec := admin:database-geospatial-element-index("/my/namespace",
                "elementname", "wgs84", fn:false() )
  return
  admin:database-delete-geospatial-element-index($config, $dbid, $geospec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-geospatial-element-pair-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$geospatial-element-pair-indexes as element(db:geospatial-element-pair-index)*
)  as   element(configuration)
Summary:

This function deletes a geospatial element pair index for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$geospatial-element-pair-indexes : A geospatial element pair index specification, typically the result of an admin:database-geospatial-element-pair-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config :=  admin:get-configuration()
  let $geospec :=  admin:database-geospatial-element-pair-index("/my/namespace",
          "elementname", "/my/namespace", "lat", 
	  "/my/namespace", "long", "wgs84", fn:false() )
  return
  admin:database-delete-geospatial-element-pair-index($config, 
     xdmp:database("myDatabase"), $geospec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-merge-blackout(
$config as element(configuration),
$database-id as xs:unsignedLong,
$blackouts as element(db:merge-blackout)*
)  as   element(configuration)
Summary:

This function deletes a merge blackout specification for a database from a configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$blackouts : The merge blackout(s) to delete. Typically, the result of an admin:database-get-merge-blackouts call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-delete-phrase-around(
$config as element(configuration),
$database-id as xs:unsignedLong,
$phrase-arounds as element(db:phrase-around)*
)  as   element(configuration)
Summary:

This function deletes a phrase around for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$phrase-arounds : A phrase specification, typically the result of an admin:database-phrase-through call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-delete-phrase-through(
$config as element(configuration),
$database-id as xs:unsignedLong,
$phrase-throughs as element(db:phrase-through)*
)  as   element(configuration)
Summary:

This function deletes a phrase through for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$phrase-throughs : A phrase through specification, typically the result of an admin:database-phrase-through call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $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.  :)  
  

admin:database-delete-range-element-attribute-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$attribute-indexes as element(db:range-element-attribute-index)*
)  as   element(configuration)
Summary:

This function deletes a range element attribute index for the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$attribute-indexes : An element attribute range index specification, typically the result of an admin:database-range-element-attribute-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $rangespec := admin:database-range-element-attribute-index("string", 
      "/my/namespace", "elementname", "", "myAttribute",
      "http://marklogic.com/collation/", fn:false() )
  return
  admin:database-delete-range-element-attribute-index($config, $dbid, $rangespec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-range-element-index(
$config as element(configuration),
$database-id as xs:unsignedLong,
$range-indexes as element(db:range-element-index)*
)  as   element(configuration)
Summary:

This function deletes a range element index for the specified database in the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$range-indexes : An element range index specification, typically the result of an admin:database-range-element-index call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $rangespec := admin:database-range-element-index("string", "/my/namespace",
                "elementname", "http://marklogic.com/collation/",
		fn:false() )
  return
  admin:database-delete-range-element-index($config, $dbid, $rangespec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-delete-word-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong,
$word-lexicons as element(db:word-lexicon)*
)  as   element(configuration)
Summary:

This function deletes a word lexicon for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$word-lexicons : A word lexicon specification, typically the result of an admin:database-word-lexicon call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("Documents")
  let $lexspec := admin:database-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.  :)  
  

admin:database-delete-word-query-excluded-element(
$config as element(configuration),
$database-id as xs:unsignedLong,
$excluded-elements as element(db:excluded-element)*
)  as   element(configuration)
Summary:

This function deletes the word query excluded element specification in the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$excluded-elements : The excluded elements specification, typically the result of an admin:database-excluded-element call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $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.  :)  
  

admin:database-delete-word-query-included-element(
$config as element(configuration),
$database-id as xs:unsignedLong,
$included-elements as element(db:included-element)*
)  as   element(configuration)
Summary:

This function deletes the word query included element specification in the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$included-elements : The included elements specification, typically the result of an admin:database-included-element call.

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  let $dbid := xdmp:database("myDatabase")
  let $wqspec :=   admin:database-included-element("http://myuri/namespace", 
  "element-name", 1.0, "", "myAttribute", "some value")
  return
  admin:database-delete-word-query-included-element($config, $dbid, $wqspec)
  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)  
  

admin:database-detach-forest(
$config as element(configuration),
$database-id as xs:unsignedLong,
$forest-id as xs:unsignedLong
)  as   element(configuration)
Summary:

This function detaches the specified forest from the specified database.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).
$forest-id : The ID of the forest. For example, xdmp:forest("myForest") specified the ID for a forest named "myForest".

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-detach-forest($config, xdmp:database("myDatabase"),
      xdmp:forest("myForest") )
  

admin:database-element-attribute-word-lexicon(
$parent-namespace as xs:string,
$parent-localname as xs:string,
$namespace as xs:string,
$localname as xs:string,
$collation as xs:string
)  as   element(db:element-attribute-word-lexicon)
Summary:

This function constructs an element attribute word lexicon specification.

Parameters:
$parent-namespace : The namespace of the parent element for the attribute.
$parent-localname : The local name of the parent element for the attribute.
$namespace : The namespace URI.
$localname : The local name for the node.
$collation : The collation URI (for example, http://marklogic.com/collation/.

Example:
  xquery version "1.0-ml";

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

  admin:database-element-attribute-word-lexicon("my/namepsace", "elementname", 
	"", "myAttribute", "http://marklogic.com/collation/" )
  (: returns the element attribute word lexicon specification :)
  

admin:database-element-word-lexicon(
$namespace as xs:string,
$localname as xs:string,
$collation as xs:string
)  as   element(db:element-word-lexicon)
Summary:

This function constructs an element word lexicon specification.

Parameters:
$namespace : The namespace URI.
$localname : The local name for the node.
$collation : The collation URI (for example, http://marklogic.com/collation/).

Example:
  xquery version "1.0-ml";

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

  admin:database-element-word-lexicon("my/namepsace", "elementname", 
	"http://marklogic.com/collation/" )
  (: returns the element word lexicon specification :)
  

admin:database-element-word-query-through(
$namespace as xs:string,
$localname as xs:string
)  as   element(db:element-word-query-through)
Summary:

This function constructs an element word query through specification.

Parameters:
$namespace : The namespace URI.
$localname : The local name for the node.

Example:
  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 :)
  

admin:database-excluded-element(
$namespace as xs:string,
$localname as xs:string
)  as   element(db:excluded-element)
Summary:

This function constructs an excluded element specification.

Parameters:
$namespace : The namespace URI. Specify an empty string if the element is in no namespace.
$localname : The local name for the node.

Example:
  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 :)
  

admin:database-field(
$field-name as xs:string,
$include-root as xs:boolean
)  as   element(db:field)
Summary:

This function constructs a field specification.

Parameters:
$field-name : The name of the field.
$include-root : A boolean value, true to start including at the root, false to not include until an included element is reached.

Example:
  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 :)
  

admin:database-fragment-parent(
$namespace as xs:string,
$localname as xs:string
)  as   element(db:fragment-parent)
Summary:

This function constructs a fragment parent specification.

Parameters:
$namespace : The namespace URI. Specify an empty string if the element is in no namespace.
$localname : The local name for the node.

Example:
  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 :)
  

admin:database-fragment-root(
$namespace as xs:string,
$localname as xs:string
)  as   element(db:fragment-root)
Summary:

This function constructs a fragment root specification.

Parameters:
$namespace : The namespace URI. Specify an empty string if the element is in no namespace.
$localname : The local name for the node.

Example:
  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 :)
  

admin:database-geospatial-element-attribute-pair-index(
$parent-namespace as xs:string,
$parent-localname as xs:string,
$latitude-namespace as xs:string,
$latitude-localname as xs:string,
$longitude-namespace as xs:string,
$longitude-localname as xs:string,
$coordinate-system as xs:string,
$range-value-positions as xs:boolean
)  as   element(db:geospatial-element-attribute-pair-index)
Summary:

This function constructs a geospatial element attribute pair index specification.

Parameters:
$parent-namespace : The namespace of the parent element for the attribute.
$parent-localname : The local name of the parent element for the attribute.
$latitude-namespace : The namespace for the element containing the latitude.
$latitude-localname : The local name for the element containing the latitude.
$longitude-namespace : The namespace for the element containing the longitude.
$longitude-localname : The local name for the element containing the longitude.
$coordinate-system : The coordinate system. Must be one of wgs84 or raw.
$range-value-positions : A boolean specifying whether to maintain value postions in this index (used with co-occurrences).

Example:
  xquery version "1.0-ml";

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

  admin:database-geospatial-element-attribute-pair-index("/my/namespace",
          "elementname", "/my/namespace", "lat", 
          "/my/namespace", "long", "wgs84", fn:false() )
  (: returns the geospatial element attribute pair index specification :)
  

admin:database-geospatial-element-child-index(
$parent-namespace as xs:string,
$parent-localname as xs:string,
$namespace as xs:string,
$localname as xs:string,
$coordinate-system as xs:string,
$range-value-positions as xs:boolean
)  as   element(db:geospatial-element-child-index)
Summary:

This function constructs a geospatial element child index specification.

Parameters:
$parent-namespace : The namespace of the parent element for the attribute.
$parent-localname : The local name of the parent element for the attribute.
$namespace : The namespace URI. Specify an empty string if the element is in no namespace.
$localname : The local name for the node.
$coordinate-system : The coordinate system. Must be one of wgs84 or raw.
$range-value-positions : A boolean specifying whether to maintain value postions in this index (used with co-occurrences).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  admin:database-geospatial-element-child-index("/my/namespace",
        "elementname", "/my/namespace", "child-element", 
        "wgs84", fn:false() )
  (: returns the geospatial element child index specification :)
  

admin:database-geospatial-element-index(
$namespace as xs:string,
$localname as xs:string,
$coordinate-system as xs:string,
$range-value-positions as xs:boolean
)  as   element(db:geospatial-element-index)
Summary:

This function constructs a geospatial element index specification.

Parameters:
$namespace : The namespace URI.
$localname : The local name for the node.
$coordinate-system : The coordinate system. Must be one of wgs84 or raw.
$range-value-positions : A boolean specifying whether to maintain value postions in this index (used with co-occurrences).

Example:
  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() )
  (: returns the geospatial element index specification :)
  

admin:database-geospatial-element-pair-index(
$parent-namespace as xs:string,
$parent-localname as xs:string,
$latitude-namespace as xs:string,
$latitude-localname as xs:string,
$longitude-namespace as xs:string,
$longitude-localname as xs:string,
$coordinate-system as xs:string,
$range-value-positions as xs:boolean
)  as   element(db:geospatial-element-pair-index)
Summary:

This function constructs a geospatial element pair index specification.

Parameters:
$parent-namespace : The namespace of the parent element for the attribute.
$parent-localname : The local name of the parent element for the attribute.
$latitude-namespace : The namespace for the element containing the latitude.
$latitude-localname : The local name for the element containing the latitude.
$longitude-namespace : The namespace for the element containing the longitude.
$longitude-localname : The local name for the element containing the longitude.
$coordinate-system : The coordinate system. Must be one of wgs84 or raw.
$range-value-positions : A boolean specifying whether to maintain value postions in this index (used with co-occurrences).

Example:
  xquery version "1.0-ml";

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

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

admin:database-get-attached-forests(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   xs:unsignedLong*
Summary:

This function returns the attached forest IDs for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-get-attached-forests($config, xdmp:database("myDatabase"))
  (: returns the IDs of the attached forests :)
  

admin:database-get-attribute-value-positions(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the attribute value positions setting for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-get-attribute-value-positions($config, 
        xdmp:database("myDatabase"))
  (: returns the attribute value positions setting :)
  

admin:database-get-backups(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   element(db:database-backup)*
Summary:

This function returns the scheduled backups for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("mydatabase")).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";
    
  let $config := admin:get-configuration()
  return
  admin:database-get-backups($config, xdmp:database("mydatabase") )
  (: returns the scheduled backups for the database :)
  

admin:database-get-collection-lexicon(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the collection lexicon setting for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-get-collection-lexicon($config, xdmp:database("myDatabase"))
  (: returns the collection lexicon setting :)
  

admin:database-get-directory-creation(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the directory creation setting for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-get-directory-creation($config, xdmp:database("myDatabase"))
  (: returns the directory creation setting :)
  

admin:database-get-element-attribute-word-lexicons(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   element(db:element-attribute-word-lexicon)*
Summary:

This function returns the element attribute word lexicons specification(s) for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  return
  admin:database-get-element-attribute-word-lexicons($config, 
        xdmp:database("myDatabase") )
  (: returns the element attribute word lexicon specifications for the database :)
  

admin:database-get-element-value-positions(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the element value positions setting for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-get-element-value-positions($config, 
        xdmp:database("myDatabase"))
  (: returns the element value positions setting :)
  

admin:database-get-element-word-lexicons(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   element(db:element-word-lexicon)*
Summary:

This function returns the element word lexicons specification(s) for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  return
  admin:database-get-element-word-lexicons($config, xdmp:database("myDatabase") )
  (: returns the element word lexicon specifications for the database :)
  

admin:database-get-element-word-positions(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the element word positions setting for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-get-element-word-postions($config, xdmp:database("myDatabase"))
  (: returns the element word positions setting :)
  

admin:database-get-element-word-query-throughs(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   element(db:element-word-query-through)*
Summary:

This function returns the element word query throughs specification(s) for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin" 
		  at "/MarkLogic/admin.xqy";
		
  let $config := admin:get-configuration()
  return
  admin:database-get-element-word-query-throughs($config, 
        xdmp:database("myDatabase") )
  (: returns the element word query through specifications for the database :)
  

admin:database-get-enabled(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   xs:boolean
Summary:

This function returns the enabled value for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.
$database-id : The id of the database (for example, xdmp:database("myDatabase")).

Example:
  xquery version "1.0-ml";

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

  let $config := admin:get-configuration()
  return
  admin:database-get-enabled($config, xdmp:database("myDatabase"))
  (: returns the enabled setting :)
  

admin:database-get-expunge-locks(
$config as element(configuration),
$database-id as xs:unsignedLong
)  as   xs:string
Summary:

This function returns the expunge locks setting for the specified database from the configuration.

Parameters:
$config : A configuration specification, typically as returned from one of the Admin module functions.