15.7.5. Sharing the Global Index

The Query Module in JBoss Data Grid has the option to have a single set of indexes shared by all nodes. The only Lucene directories supported in this mode, and where indexes can be made available to the entire cluster are:
  • The JBoss Data Grid directory provider. Either replicated or distributed cache modes can be used when sharing the indexes in this manner.
  • A local filesystem-based index, which is periodically synchronized with other nodes using simple file copy. This requires a shared network drive configured externally.
When enabling shared indexes, the indexLocalOnly attribute of the indexing element must be set to "true". For example:
<namedCache name="globalSharedIndexes">
	<clustering mode="distributed"/>
	<indexing enabled="true" indexLocalOnly="true">
		<property name=
			"default.directory_provider" value="infinispan"/>
		<property name=
			"default.exclusive_index_use" value="false"/>
	</indexing>
</namedCache>
hibernate.search is also a valid optional prefix for configuration property keys.

Important

The Query Module is currently only available as a Technical Preview for JBoss Data Grid 6.1.