# Configuring a Form Runner eXist database

## Deprecation

\[SINCE Orbeon Forms 2019.1]

Using the eXist database with Orbeon Forms is deprecated. We recommend using one of the supported [relational databases](https://doc.orbeon.com/form-runner/persistence/relational-db) for production.

## Removal

[\[SINCE Orbeon Forms 2023.1\]](https://doc.orbeon.com/release-notes/orbeon-forms-2023.1)

The eXist database is no longer included in the standard Orbeon Forms WAR file. If you are using that version or newer, you don't need to explicitly remove eXist.

## Rationale

By default, Orbeon Forms ships with an embedded eXist-db database. For production, this is not an ideal setup and it is better to have a separate eXist-db database. After you download and install eXist-db, you should follow the instruction below to set it up, and let Orbeon Forms know how it should connect to eXist-db.

## Setup

### Configuring full-text indexing in eXist-db

Orbeon Forms uses the [Lucene-based full-text index](http://exist-db.org/exist/apps/doc/lucene.xml). Without this configuration, free-text search in the Form Runner Summary page won't work. After you install eXist-db, store a `collection.xconf` file as follows in the eXist-db, under `system/config/db/orbeon/fr/`. You can also find the [latest version of this file on GitHub](https://github.com/orbeon/orbeon-forms/blob/master/data/system/config/db/orbeon/fr/collection.xconf).

```xml
<collection xmlns="http://exist-db.org/collection-config/1.0">
    <index>
        <!-- Disable the standard full text index -->
        <fulltext default="none" attributes="no"/>
        <!-- Lucene index is configured below -->
        <lucene>
            <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
            <!-- We want to index the content of all form elements -->
            <text match="//*"/>
        </lucene>
    </index>
</collection>
```

### Configuring Form Runner

Set the `oxf.fr.persistence.exist.exist-uri` in your Orbeon Forms `properties-local.xml` to tell Form Runner how to connect to your eXist-db REST API, using the appropriate URL.

```xml
<property
    as="xs:anyURI"
    name="oxf.fr.persistence.exist.exist-uri"
    value="http://orbeon:secret@localhost:8090/exist/rest/db/orbeon/fr"/>
```
