You are looking at documentation for an older release. Not what you want? See the current release documentation.
eXo Platform uses local JCR index by default. You can switch between local index and shared index by configuration.
The local indexing is defaulted for simplifying configuration. Each strategy has its pros and cons. Here is brief of their characteristics, but it is strongly recommended you read the given links for better understanding:
Local indexing: Each node manages its own local index storage. The "documents" (to be indexed) are replicated within nodes.
"Documents" are Lucene term that means a block of data ready for indexing. The same "documents" are replicated between nodes and each node locally indexes it, so the local indexes are updated for the running nodes.
There are additional mechanisms for a new node that starts for the first time to initiate its local index, and for a node joining the cluster after downtime to update its local index.
Read this link for details.
Shared indexing: Every node has read access to a shared index and has its own in-memory index. A single "coordinator" node is responsible for pulling in-memory indexes and updating the shared index.
It allows searching for newly added content immediately. However, there are rare cases that search result is different between nodes for a while.
Read this link for details.
For LOCAL INDEXING, the index directory should be a local path for each node. In JBoss it is set already by default:
<property name="exo.jcr.index.data.dir" value="${exo.jcr.data.dir}/index"/>
But for Tomcat, you need to set it yourself, in exo.properties
file:
exo.jcr.index.data.dir=gatein/data/jcr/index
If you want to use a SHARED INDEX for every node:
Enable the profile cluster-index-shared.
In JBoss, edit $PLATFORM_JBOSS_HOME/standalone/configuration/standalone-exo-cluster.xml
:
<property name="exo.profiles" value="all,cluster,cluster-index-shared"/>
In Tomcat, edit setenv-customize.sh
(.bat for Windows, see
Customizing environment variables):
EXO_PROFILES="all,cluster,cluster-index-shared"
Set the index directory (exo.jcr.index.data.dir
) to a network sharing path.
In JBoss, edit $PLATFORM_JBOSS_HOME/standalone/configuration/standalone-exo-cluster.xml
:
<property name="exo.jcr.index.data.dir" value="${exo.shared.dir}/jcr/index"/>
In Tomcat, if you do not configure it, exo.jcr.index.data.dir
is already set to a
sub-folder of the shared directory EXO_DATA_DIR
. It is done in setenv.*
:
CATALINA_OPTS="$CATALINA_OPTS -Dexo.jcr.index.data.dir=\"${EXO_DATA_DIR}/jcr/index\""
You can override it in exo.properties
:
exo.jcr.index.data.dir=/path/of/a/shared/folder/for/all/nodes