Skip to main content

Administrating MarkLogic Server

Document and Directory Settings

The document and directory settings affect the default settings for how documents and directories are created in the database.

Database Setting

Description

directory creation

Specifies if directories should be automatically created when a document is created. If you are using the database to store documents accessible via a WebDAV server or as a Modules database, this setting should be set to automatic. The following are the settings:

  • automatic—directories are automatically created based on the URI of a document.

  • manual-enforced—requires that the directory hierarchy corresponding to the URI exists before creating a document. If you create a document where the corresponding directory hierarchy does not exist, an error is raised. For example, if you try to create a document with the URI

    http://marklogic.com/file.xml, then the directory with URI http://marklogic.com/ must exist. Otherwise, an error is raised. This setting provides the same behavior as a file system.

  • manual—directories are not automatically created, but documents can still be created without corresponding directories.

For more information about directories, see Directories. For more information about Modules databases, see Modules Database.

maintain last modified

Creates and updates the last-modified property each time a document is created or updated. The default is false.

maintain directory last modified

Creates and updates the last-modified property on a directory each time a directory is created or updated. If set to true, update operations on documents in a directory will also update the directory last-modified timestamp, which can cause some contention when multiple documents in the directory are being updated. If your application is experiencing contention during these type of updates (for example, if you see deadlock-detected messages in the error log), set this property to false. The default is false.

inherit permissions

When set to true, documents and directories automatically inherit permissions from their parent directory (if permissions are not set explicitly when creating the document or directory). If there are any default permissions on the user who is creating the document or directory, those permissions are combined with any inherited permissions.

inherit collections

When set to true, documents and directories automatically inherit collection settings from their parent directory (if collections are not set explicitly when creating the document or directory). If there are any default collections on the user who is creating the document or directory, those permissions are combined with any inherited collections.

inherit quality

When set to true, documents and directories automatically inherit any quality settings from their parent directory (if quality is not set explicitly when creating the document or directory).