2.2.3. Query Handler configuration Indexing in clustered environment Asynchronous re-indexing Lucene tuning

Before going deeper into theQueryHandler configuration, you might learn about the query-handler parameters in the following sample configuration:

<workspace name="ws">
    <query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
            <property name="index-dir" value="shareddir/index/db1/ws" />
            <property name="changesfilter-class"
            value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter" />
            <property name="jbosscache-configuration" value="jbosscache-indexer.xml" />
            <property name="jgroups-configuration" value="udp-mux.xml" />
            <property name="jgroups-multiplexer-stack" value="true" />
            <property name="jbosscache-cluster-name" value="JCR-cluster-indexer-ws" />
            <property name="max-volatile-time" value="60" />
            <property name="rdbms-reindexing" value="true" />
            <property name="reindexing-page-size" value="1000" />
            <property name="index-recovery-mode" value="from-coordinator" />
            <property name="index-recovery-filter"
            value="org.exoplatform.services.jcr.impl.core.query.lucene.DocNumberRecoveryFilter" />
            <property name="indexing-thread-pool-size" value="16" />

Property nameDescription
index-dir Path to index.
changesfilter-class The FQN of the class is to indicate the policy of managing the Lucene indexes changes. This class must extend org.exoplatform.services.jcr.impl.core.query.IndexerChangesFilter. This must be set in cluster environment to define the clustering strategy which needs to be adopted. To use the shared indexes strategy, you can set it to org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter. It is recommended you set the Local Indexes Strategy to org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter.
jbosscache-configuration Template of JBoss-cache configuration for all query-handlers in repository.
jgroups-configuration This is the path to JGroups configuration that should not be anymore jgroups' stack definitions but a normal jgroups configuration format with the shared transport configured by setting the jgroups property singleton_name to a unique name (it must remain to be unique from one portal container to another). This file is also pre-bundled with templates and is recommended for use.
jgroups-multiplexer-stack If the parameter value is set to "true", it will indicate that the file corresponding to the jgroups-configuration parameter is actually a file defining a set of jgroups multiplexer stacks. In the XML tag jgroupsConfig within the Jboss Cache configuration, you will then be able to set the name of the multiplexer stack to use thanks to multiplexerStack the attribute. Please note that the jgroups multiplexer has been deprecated by the jgroups Team and has been replaced with the shared transport so it is highly recommended you not use it anymore.
jbosscache-cluster-name Cluster name which must be unique.
max-volatile-time Max time to live for Volatile Index.
rdbms-reindexing Indicates whether the RDBMS re-indexing mechanism must be used or not. The default value is "true".
reindexing-page-size The maximum amount of nodes which can be retrieved from storage for re-indexing purpose. The default value is "100".
index-recovery-mode If the parameter has been set tofrom-indexing, a full indexing will be automatically launched. If the parameter has been set to from-coordinator (default behavior), the index will be retrieved from coordinator.
index-recovery-filter Defines implementation class or classes of RecoveryFilters, the mechanism of index synchronization for Local Index strategy.
async-reindexing Controls the process of re-indexing on JCR's startup. If a flag is set, indexing will be launched asynchronously without blocking the JCR. Its default value is "false".
indexing-thread-pool-size Defines the total amount of indexing threads.
max-volatile-size The maximum volatile index size in bytes until it is written to the disk. The default value is 1048576 (1MB).


  • If you use postgreSQL and the rdbms-reindexing parameter is set to "true", the performance of the queries used while indexing can be improved by setting the enable_seqscan to off or default_statistics_target to at least 50 in the configuration of your database. Then, you need to restart DB server and make analyze of the JCR_SVALUE (or JCR_MVALUE) table.

  • If you use DB2 and the rdbms-reindexing parameter is set to "true", the performance of the queries used while indexing can be improved by making statistics on tables by running "RUNSTATS ON TABLE <scheme>.<table> WITH DISTRIBUTION AND INDEXES ALL" for JCR_SITEM (or JCR_MITEM) and JCR_SVALUE (or JCR_MVALUE) tables.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus