Hibernate SVN: r12805 - trunk/HibernateExt/search/src/java/org/hibernate/search/backend.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:48:22 -0400 (Tue, 24 Jul 2007)
New Revision: 12805
Added:
trunk/HibernateExt/search/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java
Log:
HSEARCH-67.
New wrapper class for the indexing parameters.
Added: trunk/HibernateExt/search/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java (rev 0)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java 2007-07-24 09:48:22 UTC (rev 12805)
@@ -0,0 +1,93 @@
+package org.hibernate.search.backend;
+
+/**
+ * Wrapper class around the Lucene indexing parameters <i>mergeFactor</i>, <i>maxMergeDocs</i> and
+ * <i>maxBufferedDocs</i>.
+ * <p>
+ * There are two sets of these parameters. One is for regular indexing the other is for batch indexing
+ * triggered by <code>FullTextSessoin.index(Object entity)</code>
+ *
+ * @author Hardy Ferentschik
+ *
+ */
+public class LuceneIndexingParameters {
+
+ private int mergeFactor = 10;
+
+ private int maxMergeDocs = Integer.MAX_VALUE;
+
+ private int maxBufferedDocs = 10;
+
+ private int batchMergeFactor = 10;
+
+ private int batchMaxMergeDocs = Integer.MAX_VALUE;
+
+ private int batchMaxBufferedDocs = 10;
+
+ // the defaults settings
+ private static final int DEFAULT_MERGE_FACTOR = 10;
+
+ private static final int DEFAULT_MAX_MERGE_DOCS = Integer.MAX_VALUE;
+
+ private static final int DEFAULT_MAX_BUFFERED_DOCS = 10;
+
+ /**
+ * Constructor which instantiates a new parameter object with the the default values.
+ */
+ public LuceneIndexingParameters() {
+ mergeFactor = DEFAULT_MERGE_FACTOR;
+ batchMergeFactor = DEFAULT_MERGE_FACTOR;
+ maxMergeDocs = DEFAULT_MAX_MERGE_DOCS;
+ batchMaxMergeDocs = DEFAULT_MAX_MERGE_DOCS;
+ maxBufferedDocs = DEFAULT_MAX_BUFFERED_DOCS;
+ batchMaxBufferedDocs = DEFAULT_MAX_BUFFERED_DOCS;
+ }
+
+ public int getMaxMergeDocs() {
+ return maxMergeDocs;
+ }
+
+ public void setMaxMergeDocs(int maxMergeDocs) {
+ this.maxMergeDocs = maxMergeDocs;
+ }
+
+ public int getMergeFactor() {
+ return mergeFactor;
+ }
+
+ public void setMergeFactor(int mergeFactor) {
+ this.mergeFactor = mergeFactor;
+ }
+
+ public int getBatchMaxMergeDocs() {
+ return batchMaxMergeDocs;
+ }
+
+ public void setBatchMaxMergeDocs(int batchMaxMergeDocs) {
+ this.batchMaxMergeDocs = batchMaxMergeDocs;
+ }
+
+ public int getBatchMergeFactor() {
+ return batchMergeFactor;
+ }
+
+ public void setBatchMergeFactor(int batchMergeFactor) {
+ this.batchMergeFactor = batchMergeFactor;
+ }
+
+ public int getBatchMaxBufferedDocs() {
+ return batchMaxBufferedDocs;
+ }
+
+ public void setBatchMaxBufferedDocs(int batchMaxBufferedDocs) {
+ this.batchMaxBufferedDocs = batchMaxBufferedDocs;
+ }
+
+ public int getMaxBufferedDocs() {
+ return maxBufferedDocs;
+ }
+
+ public void setMaxBufferedDocs(int maxBufferedDocs) {
+ this.maxBufferedDocs = maxBufferedDocs;
+ }
+}
Property changes on: trunk/HibernateExt/search/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java
___________________________________________________________________
Name: svn:keywords
+ Id
17 years, 5 months
Hibernate SVN: r12804 - trunk/HibernateExt/search/src/java/org/hibernate/search/store.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:47:52 -0400 (Tue, 24 Jul 2007)
New Revision: 12804
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/store/DirectoryProviderFactory.java
Log:
HSEARCH-67.
Added code to retrieve the lucene indexing parameters from the configuration.
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/store/DirectoryProviderFactory.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/store/DirectoryProviderFactory.java 2007-07-24 09:45:37 UTC (rev 12803)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/store/DirectoryProviderFactory.java 2007-07-24 09:47:52 UTC (rev 12804)
@@ -9,6 +9,7 @@
import org.hibernate.HibernateException;
import org.hibernate.cfg.Configuration;
import org.hibernate.search.annotations.Indexed;
+import org.hibernate.search.backend.LuceneIndexingParameters;
import org.hibernate.search.impl.SearchFactoryImpl;
import org.hibernate.search.engine.SearchFactoryImplementor;
import org.hibernate.search.store.optimization.OptimizerStrategy;
@@ -24,10 +25,12 @@
* Create a Lucene directory provider
* <p/>
* Lucene directory providers are configured through properties
- * - hibernate.search.default.* and
- * - hibernate.search.<indexname>.*
+ * <ul>
+ * <li>hibernate.search.default.* and</li>
+ * <li>hibernate.search.<indexname>.*</li>
+ * </ul>
* <p/>
- * <indexname> properties have precedence over default
+ * <indexname> properties have precedence over default
* <p/>
* The implementation is described by
* hibernate.search.[default|indexname].directory_provider
@@ -36,12 +39,21 @@
*
* @author Emmanuel Bernard
* @author Sylvain Vieujot
+ * @author Hardy Ferentschik
*/
public class DirectoryProviderFactory {
public List<DirectoryProvider<?>> providers = new ArrayList<DirectoryProvider<?>>();
private static String LUCENE_PREFIX = "hibernate.search.";
private static String LUCENE_DEFAULT = LUCENE_PREFIX + "default.";
private static String DEFAULT_DIRECTORY_PROVIDER = FSDirectoryProvider.class.getName();
+
+ // Lucene index performance paramters
+ private static final String MERGE_FACTOR = "merge_factor";
+ private static final String MAX_MERGE_DOCS = "max_merge_docs";
+ private static final String MAX_BUFFERED_DOCS = "max_buffered_docs";
+ private static final String BATCH_MERGE_FACTOR = "merge_factor.batch";
+ private static final String BATCH_MAX_MERGE_DOCS = "max_merge_docs.batch";
+ private static final String BATCH_MAX_BUFFERED_DOCS = "max_buffered_docs.batch";
//TODO for the public?
public DirectoryProvider<?> createDirectoryProvider(XClass entity, Configuration cfg, SearchFactoryImplementor searchFactoryImplementor) {
@@ -77,22 +89,105 @@
return providers.get( index );
}
else {
- boolean incremental = indexProps.containsKey( "optimizer.operation_limit.max" )
- || indexProps.containsKey( "optimizer.transaction_limit.max" );
- OptimizerStrategy optimizerStrategy;
- if (incremental) {
- optimizerStrategy = new IncrementalOptimizerStrategy();
- optimizerStrategy.initialize( provider, indexProps, searchFactoryImplementor);
- }
- else {
- optimizerStrategy = new NoOpOptimizerStrategy();
- }
- searchFactoryImplementor.addOptimizerStrategy(provider, optimizerStrategy);
+ configureOptimizerStrategy(searchFactoryImplementor, indexProps, provider);
+ configureIndexingParameters(searchFactoryImplementor, indexProps, provider);
providers.add( provider );
return provider;
}
}
+ private void configureOptimizerStrategy(SearchFactoryImplementor searchFactoryImplementor, Properties indexProps, DirectoryProvider<?> provider) {
+ boolean incremental = indexProps.containsKey( "optimizer.operation_limit.max" )
+ || indexProps.containsKey( "optimizer.transaction_limit.max" );
+ OptimizerStrategy optimizerStrategy;
+ if (incremental) {
+ optimizerStrategy = new IncrementalOptimizerStrategy();
+ optimizerStrategy.initialize( provider, indexProps, searchFactoryImplementor);
+ }
+ else {
+ optimizerStrategy = new NoOpOptimizerStrategy();
+ }
+ searchFactoryImplementor.addOptimizerStrategy(provider, optimizerStrategy);
+ }
+
+ /**
+ * Creates a new <code>LuceneIndexingParameters</code> instance for the specified provider.
+ * If there are no matching properties in the configuration default values will be applied.
+ * <p>
+ * NOTE:</br>
+ * If a non batch value is set in the configuration apply it also to the
+ * batch mode. This covers the case where users only specify
+ * paramters for the non batch mode. In this case the same parameters apply for
+ * batch indexing.
+ * </p>
+ *
+ * @param searchFactoryImplementor the search factory.
+ * @param indexProps The properties extracted from the configuration.
+ * @param provider The direcotry provider for which to configure the indexing parameters.
+ */
+ private void configureIndexingParameters(SearchFactoryImplementor searchFactoryImplementor, Properties indexProps, DirectoryProvider<?> provider) {
+
+ LuceneIndexingParameters indexingParams = new LuceneIndexingParameters();
+ String s = indexProps.getProperty(MERGE_FACTOR);
+
+ if (!StringHelper.isEmpty( s )) {
+ try{
+ indexingParams.setMergeFactor(Integer.valueOf(s));
+ indexingParams.setBatchMergeFactor(Integer.valueOf(s));
+ } catch (NumberFormatException ne) {
+ throw new HibernateException("Invalid value for " + MERGE_FACTOR + ": " + s);
+ }
+ }
+
+ s = indexProps.getProperty(MAX_MERGE_DOCS);
+ if (!StringHelper.isEmpty( s )) {
+ try{
+ indexingParams.setMaxMergeDocs(Integer.valueOf(s));
+ indexingParams.setBatchMaxMergeDocs(Integer.valueOf(s));
+ } catch (NumberFormatException ne) {
+ throw new HibernateException("Invalid value for " + MAX_MERGE_DOCS + ": " + s);
+ }
+ }
+
+ s = indexProps.getProperty(MAX_BUFFERED_DOCS);
+ if (!StringHelper.isEmpty( s )) {
+ try{
+ indexingParams.setMaxBufferedDocs(Integer.valueOf(s));
+ indexingParams.setBatchMaxBufferedDocs(Integer.valueOf(s));
+ } catch (NumberFormatException ne) {
+ throw new HibernateException("Invalid value for " + MAX_BUFFERED_DOCS + ": " + s);
+ }
+ }
+
+ s = indexProps.getProperty(BATCH_MERGE_FACTOR);
+ if (!StringHelper.isEmpty( s )) {
+ try{
+ indexingParams.setBatchMergeFactor(Integer.valueOf(s));
+ } catch (NumberFormatException ne) {
+ throw new HibernateException("Invalid value for " + BATCH_MERGE_FACTOR + ": " + s);
+ }
+ }
+
+ s = indexProps.getProperty(BATCH_MAX_MERGE_DOCS);
+ if (!StringHelper.isEmpty( s )) {
+ try{
+ indexingParams.setBatchMaxMergeDocs(Integer.valueOf(s));
+ } catch (NumberFormatException ne) {
+ throw new HibernateException("Invalid value for " + BATCH_MAX_MERGE_DOCS + ": " + s);
+ }
+ }
+
+ s = indexProps.getProperty(BATCH_MAX_BUFFERED_DOCS);
+ if (!StringHelper.isEmpty( s )) {
+ try{
+ indexingParams.setBatchMaxBufferedDocs(Integer.valueOf(s));
+ } catch (NumberFormatException ne) {
+ throw new HibernateException("Invalid value for " + BATCH_MAX_BUFFERED_DOCS + ": " + s);
+ }
+ }
+ searchFactoryImplementor.addIndexingParmeters(provider, indexingParams);
+ }
+
private static Properties getDirectoryProperties(Configuration cfg, String directoryProviderName) {
Properties props = cfg.getProperties();
String indexName = LUCENE_PREFIX + directoryProviderName;
@@ -133,7 +228,7 @@
pc = pc.getSuperclass();
}
while ( pc != null );
- //there is nobody outthere with a non default @Indexed.index
+ //there is nobody out there with a non default @Indexed.index
if ( rootIndex != null ) {
return rootIndex.getName();
}
17 years, 5 months
Hibernate SVN: r12803 - trunk/HibernateExt/search/src/java/org/hibernate/search/store.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:45:37 -0400 (Tue, 24 Jul 2007)
New Revision: 12803
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSMasterDirectoryProvider.java
trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java
Log:
HSEARCH-67.
Removed the 'create' flag in the call to getDirectory() call. This call is deprecated.
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSMasterDirectoryProvider.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSMasterDirectoryProvider.java 2007-07-24 09:44:20 UTC (rev 12802)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSMasterDirectoryProvider.java 2007-07-24 09:45:37 UTC (rev 12803)
@@ -58,7 +58,7 @@
log.debug( "Index directory '" + indexName + "' will be initialized");
indexDir.mkdir();
}
- directory = FSDirectory.getDirectory( indexName, create );
+ directory = FSDirectory.getDirectory( indexName);
if ( create ) {
IndexWriter iw = new IndexWriter( directory, new StandardAnalyzer(), create );
iw.close();
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java 2007-07-24 09:44:20 UTC (rev 12802)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSSlaveDirectoryProvider.java 2007-07-24 09:45:37 UTC (rev 12803)
@@ -64,7 +64,7 @@
File subDir = new File( indexName, "1" );
create = ! subDir.exists();
- directory1 = FSDirectory.getDirectory( subDir.getCanonicalPath(), create );
+ directory1 = FSDirectory.getDirectory( subDir.getCanonicalPath());
if ( create ) {
IndexWriter iw = new IndexWriter( directory1, new StandardAnalyzer(), create );
iw.close();
@@ -72,7 +72,7 @@
subDir = new File( indexName, "2" );
create = ! subDir.exists();
- directory2 = FSDirectory.getDirectory( subDir.getCanonicalPath(), create );
+ directory2 = FSDirectory.getDirectory( subDir.getCanonicalPath());
if ( create ) {
IndexWriter iw = new IndexWriter( directory2, new StandardAnalyzer(), create );
iw.close();
17 years, 5 months
Hibernate SVN: r12802 - trunk/HibernateExt/search/src/java/org/hibernate/search/store.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:44:20 -0400 (Tue, 24 Jul 2007)
New Revision: 12802
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSDirectoryProvider.java
Log:
HSEARCH-67.
Removed unused logger.
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSDirectoryProvider.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSDirectoryProvider.java 2007-07-24 09:43:47 UTC (rev 12801)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/store/FSDirectoryProvider.java 2007-07-24 09:44:20 UTC (rev 12802)
@@ -5,8 +5,6 @@
import java.io.IOException;
import java.util.Properties;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.FSDirectory;
@@ -24,7 +22,6 @@
*/
public class FSDirectoryProvider implements DirectoryProvider<FSDirectory> {
private FSDirectory directory;
- private static Log log = LogFactory.getLog( FSDirectoryProvider.class );
private String indexName;
public void initialize(String directoryProviderName, Properties properties, SearchFactoryImplementor searchFactoryImplementor) {
17 years, 5 months
Hibernate SVN: r12801 - trunk/HibernateExt/search/src/java/org/hibernate/search.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:43:47 -0400 (Tue, 24 Jul 2007)
New Revision: 12801
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java
Log:
HSEARCH-67.
Formatting and java doc updates.
Modified: trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java
===================================================================
--- trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java 2007-07-24 09:42:24 UTC (rev 12800)
+++ trunk/HibernateExt/search/src/java/org/hibernate/search/Environment.java 2007-07-24 09:43:47 UTC (rev 12801)
@@ -3,12 +3,14 @@
/**
* @author Emmanuel Bernard
+ * @author Hardy Ferentschik
*/
public final class Environment {
/**
* Enable listeners auto registration in Hibernate Annotations and EntityManager. Default to true.
*/
public static final String AUTOREGISTER_LISTENERS = "hibernate.search.autoregister_listeners";
+
/**
* Indexes base directory
*/
@@ -35,10 +37,13 @@
* default 1
*/
public static final String WORKER_THREADPOOL_SIZE = Environment.WORKER_PREFIX + "thread_pool.size";
+
/**
- * only used then execution is async
* Size of the buffer queue (besides the thread pool size)
- * default infinite
+ * <ul>
+ * <li>only used then execution is async</li>
+ * <li>default infinite</li>
+ * </ul>
*/
public static final String WORKER_WORKQUEUE_SIZE = Environment.WORKER_PREFIX + "buffer_queue.max";
@@ -46,6 +51,7 @@
* define the reader prefix
*/
public static final String READER_PREFIX = "hibernate.search.reader.";
+
/**
* define the reader strategy used
*/
17 years, 5 months
Hibernate SVN: r12800 - trunk/HibernateExt/search/doc/reference/en/modules.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:42:24 -0400 (Tue, 24 Jul 2007)
New Revision: 12800
Modified:
trunk/HibernateExt/search/doc/reference/en/modules/architecture.xml
trunk/HibernateExt/search/doc/reference/en/modules/batchindex.xml
Log:
HSEARCH-67.
Updated documentation adding the new Lucene indexing parameters.
Added $Id:$ for keyword substitution.
Modified: trunk/HibernateExt/search/doc/reference/en/modules/architecture.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/modules/architecture.xml 2007-07-24 09:42:02 UTC (rev 12799)
+++ trunk/HibernateExt/search/doc/reference/en/modules/architecture.xml 2007-07-24 09:42:24 UTC (rev 12800)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<chapter id="search-architecture">
<title>Architecture</title>
Property changes on: trunk/HibernateExt/search/doc/reference/en/modules/architecture.xml
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: trunk/HibernateExt/search/doc/reference/en/modules/batchindex.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/modules/batchindex.xml 2007-07-24 09:42:02 UTC (rev 12799)
+++ trunk/HibernateExt/search/doc/reference/en/modules/batchindex.xml 2007-07-24 09:42:24 UTC (rev 12800)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<chapter id="search-batchindex">
<title>Indexing</title>
@@ -34,6 +35,12 @@
also applied on regular transparent indexing (and not only when
<literal>session.index()</literal> is used). That's why a sensitive
<literal>batch_size</literal> value is expected.</para>
+
+ Other parameters which also can effect indexing time and memory consumption are
+ <literal>hibernate.search.[default|<indexname>].merge_factor</literal>, <literal>hibernate.search.[default|<indexname>].max_merge_docs</literal>
+ and <literal>hibernate.search.[default|<indexname>].max_buffered_docs</literal>. These parameters are Lucene
+ specific and Hibernate Search is just passing these paramters through - see <xref linkend="lucene-indexing-performance"/>
+ for more details.
<para>Here is an especially efficient way to index a given class (useful for
index (re)initialization):</para>
Property changes on: trunk/HibernateExt/search/doc/reference/en/modules/batchindex.xml
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
17 years, 5 months
Hibernate SVN: r12799 - in trunk/HibernateExt/search/doc/reference/en: modules and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:42:02 -0400 (Tue, 24 Jul 2007)
New Revision: 12799
Modified:
trunk/HibernateExt/search/doc/reference/en/master.xml
trunk/HibernateExt/search/doc/reference/en/modules/configuration.xml
trunk/HibernateExt/search/doc/reference/en/modules/lucene-native.xml
trunk/HibernateExt/search/doc/reference/en/modules/mapping.xml
Log:
HSEARCH-67.
Updated documentation adding the new Lucene indexing parameters.
Added $Id:$ for keyword substitution.
Modified: trunk/HibernateExt/search/doc/reference/en/master.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/master.xml 2007-07-24 09:40:30 UTC (rev 12798)
+++ trunk/HibernateExt/search/doc/reference/en/master.xml 2007-07-24 09:42:02 UTC (rev 12799)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
"../../../../../Hibernate3/doc/reference/support/docbook-dtd/docbookx.dtd" [
<!ENTITY architecture SYSTEM "modules/architecture.xml">
@@ -21,7 +22,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/hibernate_logo_a.png" format="png" />
+ <imagedata fileref="images/hibernate_logo_a.png" format="PNG" />
</imageobject>
</mediaobject>
</bookinfo>
Property changes on: trunk/HibernateExt/search/doc/reference/en/master.xml
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: trunk/HibernateExt/search/doc/reference/en/modules/configuration.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/modules/configuration.xml 2007-07-24 09:40:30 UTC (rev 12798)
+++ trunk/HibernateExt/search/doc/reference/en/modules/configuration.xml 2007-07-24 09:42:02 UTC (rev 12799)
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<chapter id="search-configuration">
<title>Configuration</title>
<section id="search-configuration-directory" revision="1">
<title>Directory configuration</title>
- <para>Apache Lucene has a notion of Directory where the index is stored.
- The Directory implementation can be customized but Lucene comes bundled
- with a file system and a full memory implementation. Hibernate Search has
- the notion of <literal>DirectoryProvider</literal> that handle the
+ <para>Apache Lucene has a notion of Directory to store the index files.
+ The Directory implementation can be customized, but Lucene comes bundled
+ with a file system (<literal>FSDirectoryProvider</literal>) and a full memory
+ (RAMDirectoryProvider) implementation. Hibernate Search has
+ the notion of <literal>DirectoryProvider</literal> that handles the
configuration and the initialization of the Lucene Directory.</para>
<table>
@@ -18,9 +20,9 @@
<thead>
<row>
<entry align="center">Class</entry>
+
+ <entry align="center">Description</entry>
- <entry align="center">description</entry>
-
<entry align="center">Properties</entry>
</row>
</thead>
@@ -171,9 +173,9 @@
<tbody>
<row>
- <entry>property</entry>
+ <entry>Property</entry>
- <entry>description</entry>
+ <entry>Description</entry>
</row>
<row>
@@ -428,4 +430,87 @@
</listitem>
</itemizedlist>
</section>
+
+ <section id="lucene-indexing-performance" revision="1">
+ <title>Tuning Lucene Indexing Performance</title>
+
+ <para>Hibernate Search allows you to tune the Lucene indexing performance by specifying
+ a set of parameters which are passed through to underlying Lucene
+ <literal>IndexWriter</literal> as <literal>mergeFactor</literal>, <literal>maxMergeDocs</literal>
+ and <literal>maxBufferedDocs</literal>. You can specify these paramters either as default values
+ applying for all indeces or on a per index base.
+ </para>
+ <para>There are two sets of parameters
+ allowing for different performance settings depending on the use case. During indexing operations
+ triggered by database modifications
+ <literal>hibernate.search.[default|<indexname>].merge_factor</literal>, <literal>hibernate.search.[default|<indexname>].max_merge_docs</literal>
+ and <literal>hibernate.search.[default|<indexname>].max_buffered_docs</literal> are used. The corresponding
+ <literal>.batch</literal> properties are applied when indexing occurs via
+ <literal>FullTextSession.index()</literal> (see <xref linkend="search-batchindex" />).
+ </para>
+ <para>
+ Unless the corresponding <literal>.batch</literal> property is set explicitly it will have the
+ same value as the non batch parameter.
+ </para>
+ <para>
+ For more information about Lucene indexing performace please refer to the Lucene documentation.
+ </para>
+
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry align="center">Property</entry>
+ <entry align="center">Description</entry>
+ <entry align="center">Default Value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><literal>hibernate.search.[default|<indexname>].merge_factor</literal></entry>
+ <entry>Controls segement merge frequency ans size. Used by Hibernate Search during
+ index update operations as part of database modifications.
+ </entry>
+ <entry>10</entry>
+ </row>
+
+ <row>
+ <entry><literal>hibernate.search.[default|<indexname>].max_merge_docs</literal></entry>
+ <entry>Limits the number of documents per segment. Used by Hibernate Search during
+ index update operations as part of database modifications.</entry>
+ <entry>Integer.MAX_VALUE</entry>
+ </row>
+
+ <row>
+ <entry><literal>hibernate.search.[default|<indexname>].max_buffered_docs</literal></entry>
+ <entry>Controls the amount of documents buffered during indexing. Used by Hibernate
+ Search during index update operations as part of database modifications.
+ </entry>
+ <entry>10</entry>
+ </row>
+
+ <row>
+ <entry><literal>hibernate.search.[default|<indexname>].merge_factor.batch</literal></entry>
+ <entry>Controls segement merge frequency ans size.Used during indexing via
+ <literal>FullTextSession.index()</literal></entry>
+ <entry>10</entry>
+ </row>
+
+ <row>
+ <entry><literal>hibernate.search.[default|<indexname>].max_merge_docs.batch</literal></entry>
+ <entry>Limits the number of documents per segment. Used during indexing via
+ <literal>FullTextSession.index()</literal></entry>
+ <entry>Integer.MAX_VALUE</entry>
+ </row>
+
+ <row>
+ <entry><literal>hibernate.search.[default|<indexname>].max_buffered_docs.batch</literal></entry>
+ <entry>Controls the amount of documents buffered during indexing.Used during indexing via
+ <literal>FullTextSession.index()</literal></entry>
+ <entry>10</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </section>
+
</chapter>
\ No newline at end of file
Property changes on: trunk/HibernateExt/search/doc/reference/en/modules/configuration.xml
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
Modified: trunk/HibernateExt/search/doc/reference/en/modules/lucene-native.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/modules/lucene-native.xml 2007-07-24 09:40:30 UTC (rev 12798)
+++ trunk/HibernateExt/search/doc/reference/en/modules/lucene-native.xml 2007-07-24 09:42:02 UTC (rev 12799)
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<chapter id="search-lucene-native">
<title>Accessing Lucene natively</title>
Property changes on: trunk/HibernateExt/search/doc/reference/en/modules/lucene-native.xml
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: trunk/HibernateExt/search/doc/reference/en/modules/mapping.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/modules/mapping.xml 2007-07-24 09:40:30 UTC (rev 12798)
+++ trunk/HibernateExt/search/doc/reference/en/modules/mapping.xml 2007-07-24 09:42:02 UTC (rev 12799)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<chapter id="search-mapping" revision="3">
<title>Mapping entities to the index structure</title>
Property changes on: trunk/HibernateExt/search/doc/reference/en/modules/mapping.xml
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
17 years, 5 months
Hibernate SVN: r12798 - trunk/HibernateExt/search/doc/reference/en/modules.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:40:30 -0400 (Tue, 24 Jul 2007)
New Revision: 12798
Modified:
trunk/HibernateExt/search/doc/reference/en/modules/optimize.xml
Log:
HSEARCH-67.
Added $Id:$ for keyword substitution.
Added reference to the new lucene indexing parameters.
Modified: trunk/HibernateExt/search/doc/reference/en/modules/optimize.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/modules/optimize.xml 2007-07-24 09:38:59 UTC (rev 12797)
+++ trunk/HibernateExt/search/doc/reference/en/modules/optimize.xml 2007-07-24 09:40:30 UTC (rev 12798)
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<chapter id="search-optimize">
<title>Index Optimization</title>
@@ -45,5 +46,8 @@
a JMS backend. You must apply the optimize operation on the Master
node.</para>
- <para></para>
+ <para>Further index optimisation parameters include <literal>hibernate.search.[default|<indexname>].merge_factor</literal>,
+ <literal>hibernate.search.[default|<indexname>].max_merge_docs</literal> and <literal>hibernate.search.[default|<indexname>].max_buffered_docs</literal>
+ - see <xref linkend="lucene-indexing-performance"/> for more details.
+ </para>
</chapter>
\ No newline at end of file
Property changes on: trunk/HibernateExt/search/doc/reference/en/modules/optimize.xml
___________________________________________________________________
Name: svn:keywords
+ Id
17 years, 5 months
Hibernate SVN: r12797 - trunk/HibernateExt/search/doc/reference/en/modules.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2007-07-24 05:38:59 -0400 (Tue, 24 Jul 2007)
New Revision: 12797
Modified:
trunk/HibernateExt/search/doc/reference/en/modules/query.xml
Log:
HSEARCH-67.
Added $Id:$ for keyword substitution.
First commit to HSearch.
Modified: trunk/HibernateExt/search/doc/reference/en/modules/query.xml
===================================================================
--- trunk/HibernateExt/search/doc/reference/en/modules/query.xml 2007-07-21 08:05:50 UTC (rev 12796)
+++ trunk/HibernateExt/search/doc/reference/en/modules/query.xml 2007-07-24 09:38:59 UTC (rev 12797)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<chapter id="search-query" xreflabel="Querying">
<title>Querying</title>
Property changes on: trunk/HibernateExt/search/doc/reference/en/modules/query.xml
___________________________________________________________________
Name: svn:keywords
- Author Date Id Revision
+ Id
17 years, 5 months
Hibernate SVN: r12796 - core/trunk/src/site/resources/css.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-07-21 04:05:50 -0400 (Sat, 21 Jul 2007)
New Revision: 12796
Modified:
core/trunk/src/site/resources/css/site.css
Log:
basic site design for dist bundles
Modified: core/trunk/src/site/resources/css/site.css
===================================================================
--- core/trunk/src/site/resources/css/site.css 2007-07-21 07:17:25 UTC (rev 12795)
+++ core/trunk/src/site/resources/css/site.css 2007-07-21 08:05:50 UTC (rev 12796)
@@ -13,9 +13,17 @@
*
* Red Hat Author(s): Steve Ebersole
*/
-h2 {
+
+/*
+ * Apply the colors taken from the Hibernate logo in various places
+ * thoughout the generated site pages.
+ *
+ * brown : #aea477
+ * gray : #59666c
+ */
+
+h1, h2, h3, h4, h5, h6 {
color: #aea477;
- /*color: #c2b585;*/
}
#navcolumn h5 {
17 years, 6 months