Skip to content

Database Configuration

dmcassel edited this page Jun 8, 2012 · 2 revisions

In deploy/ml-config.xml, you will find XML describing the content and modules databases, along with placeholders for triggers, schemas, and the test-content database.

Database Settings

Database settings are configured by adding the appropriate element as a child to the database element. For instance, to turn on the URI lexicon, have this in as a direct child of the database element:

<uri-lexicon>true</uri-lexicon>

Indexes

Examples are provided in ml-config.xml to help you define indexes. You can also run the following command, which will build and index based on your answers to a series of questions:

ml index

Forests

There are two ways to configure forests for the content database.

Forests per host

In deploy/default.properties, the content-forests-per-host property is set to 1. When deploying to a cluster, this property will control how many content database forests are built for each host in the target host's group.

To specify the forest data directory, add a db:database/db:forests/db:data-directory element with the path to the data directory. For example:

<databases xmlns="http://marklogic.com/xdmp/database" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/database database.xsd">
  <!--Application Database Configuration-->
  @ml.test-content-db-xml
  <database>
    <database-name>@ml.content-db</database-name>
    <forests-per-host>@ml.content-forests-per-host</forests-per-host>
    @ml.schemas-mapping
    @ml.triggers-mapping
    <forests>
      <data-directory>/space/Forests/</data-directory>
    </forests>
    <!-- etc... -->
  </database>
</databases>

If deploying to a cluster, be sure that the data directory exists and is writable by MarkLogic on all hosts.

Directly configured forests

TODO

Clone this wiki locally