2.2.3. Query Handler configuration

2.2.3.1. Indexing in clustered environment
2.2.3.2. Asynchronous re-indexing
2.2.3.3. 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">
      <properties>
         <property name="index-dir" value="shareddir/index/db1/ws" />
         <property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter" />
         <property name="infinispan-configuration" value="infinispan-indexer.xml" />
         <property name="jgroups-configuration" value="udp-mux.xml" />
         <property name="infinispan-cluster-name" value="JCR-cluster" />
         <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" />
      </properties>
   </query-handler>
</workspace>
    
VariableDescription
index-dirPath to index.
changesfilter-classThe FQN of the class to use to indicate the policy to use to manage 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 to adopt. To use the Shared Indexes Strategy, you can set it to org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter. If you prefer the Local Indexes Strategy, you can set it to org.exoplatform.services.jcr.impl.core.query.ispn.LocalIndexChangesFilter.
infinispan-configurationThe template of Infinispan configuration for all query-handlers in repository (search, cache, locks).
jgroups-configurationThis 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 simply setting the jgroups property singleton_name to a unique name (it must remain unique from one portal container to another). This file is also pre-bundled with templates and is recommended for use..
infinispan-cluster-nameThe cluster name (must be unique).
max-volatile-timeThe maximum time to live for Volatile Index.
rdbms-reindexingIndicates whether the rdbms re-indexing mechanism must be used, the default value is true.
reindexing-page-sizeThe maximum amount of nodes which can be retrieved from storage for re-indexing purpose, the default value is 100.
index-recovery-modeIf the parameter has been set to from-indexing, so 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-filterDefines implementation class or classes of RecoveryFilters, the mechanism of index synchronization for Local Index strategy.
indexing-thread-pool-sizeDefines the total amount of indexing threads.
async-reindexingControls the process of re-indexing on JCR's startup. If flag set, indexing will be launched asynchronously, without blocking the JCR. Default is "false".
max-volatile-sizeThe maximum volatile index size in bytes until it is written to disk. The default value is 1048576 (1MB).
indexing-load-batching-threshold-propertyThe total amount of properties from which the application will decide to get by name all the properties of a node to be indexed using one single query instead of one query per property. The query used is the equivalent of getProperties(String namePattern). The default value is -1 which actually disables this feature. The expected value is an integer.
indexing-load-batching-threshold-nodeThe total amount of nodes to index within the same transaction from which the application will decide to get all the properties of the remaining nodes to be indexed using one single query instead of one query per property and a query that will get the list of properties. The query used is the equivalent of getProperties(). The default value is -1 which actually disables this feature. The expected value is an integer.
indexing-load-batching-threshold-dynamicIn case indexing-load-batching-threshold-property and/or indexing-load-batching-threshold-node have been enabled, you could expect to see the thresholds to be updated automatically in order to better match with the current performances of the database used. This is possible if you set this parameter to true knowing that the default value is false and if you enable the JCR statistics. Based on the JCR statistics, the application will be able to set the best possible values for your thresholds to get the best possible performances.
indexing-load-batching-threshold-ttlIn case indexing-load-batching-threshold-property and/or indexing-load-batching-threshold-node, indexing-load-batching-threshold-dynamic and the JCR statistics have been enabled, the application will regularily update if needed the thresholds. This parameter defines the periodicity of the task that will update the thresholds. The default value is 5 minutes. The expected value is a time expressed in milliseconds.

Note

  • If you use postgreSQL and the parameter rdbms-reindexing is set to true, the performances of the queries used while indexing can be improved by setting the parameter 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.

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