Skip to main content

Administrating MarkLogic Server

Automatic Directory Creation in a Database Settings

In the configuration for a database in the Admin Interface, there is a directory creation setting. The directory creation setting specifies whether directories are created automatically when you create a document.

If you are using a WebDAV server to load documents into a database, we recommend you use the Admin Interface to set the directory creation setting for your database to automatic. If you create a WebDAV server that accesses a database with directory creation set to automatic, the root directory (required in order to access the database via a WebDAV client) is automatically created. Automatic directory creation also helps if you are loading documents manually (using xdmp:document-load(), for example) whose URIs include directory hierarchies that do not exist in the database. Any directory implied by a URI is automatically created with directory creation set to automatic.

You can also manually create and delete directories in XQuery using xdmp:directory-create() and xdmp:directory-delete().

For details on all of the directory creation settings, see Basic Administrative Settings.