By default on Nuxeo 5.1 and Nuxeo 5.2, the Compass backend is on the file system (with Hypersonic).
With Nuxeo 5.2, Hypersonic has been replaced by Derby for every datasource, except for the compass backend, for which the switch to Derby has not been made possible yet (due to transaction problems).
The file system backend for compass is the fastest and thus should not be changed unless for good reasons.
Changing the default behavior is not straightforward. Be aware of it before going into this.
Changing the default behavior
Changing only the nuxeo.ear/datasources/nxsearch-compass-ds.xml file is not enough.
To change the default behavior, a contribution has to be made so that a new compass.cfg.xml file could be taken into account.
The contribution should contain the following fragment and be placed in a file -contrib.xml or -bundle.xml under $JBOSS/server/default/deploy/nuxeo.ear:
Note: The contribution could also be put (and thus found) in an OSGI-INF folder in any JAR, which makes such a contribution difficult to spot if it has been made this way in a project deployment.
Only after that is the compass.cfg.xml file taken into account. The compass.cfg.xml can then be crafted to define whatever connection to a datasource that is define in $JBOSS/server/default/deploy/nuxeo.ear/datasources/nxsearch-compass-ds.xml: