Hibernate SVN: r15588 - in core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433: src/org/hibernate/cfg and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: dstephan
Date: 2008-11-19 03:18:58 -0500 (Wed, 19 Nov 2008)
New Revision: 15588
Modified:
core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/build.xml
core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/src/org/hibernate/cfg/Environment.java
core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/src/org/hibernate/persister/entity/AbstractEntityPersister.java
Log:
Backported change from JBPAPP-1259.
Modified: core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/build.xml
===================================================================
--- core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/build.xml 2008-11-19 05:26:06 UTC (rev 15587)
+++ core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/build.xml 2008-11-19 08:18:58 UTC (rev 15588)
@@ -23,7 +23,7 @@
<property name="version.major" value="3"/>
<property name="version.minor" value="2"/>
<property name="version.micro" value="4"/>
- <property name="version.qualifier" value="sp1"/>
+ <property name="version.qualifier" value="sp1.JBPAPP-1433"/>
<property name="version.full" value="${version.major}.${version.minor}.${version.micro}.${version.qualifier}"/>
<property name="version.major_minor" value="${version.major}.${version.minor}"/>
<property name="fullname" value="${name}-${version.full}"/>
Modified: core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/src/org/hibernate/cfg/Environment.java
===================================================================
--- core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/src/org/hibernate/cfg/Environment.java 2008-11-19 05:26:06 UTC (rev 15587)
+++ core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/src/org/hibernate/cfg/Environment.java 2008-11-19 08:18:58 UTC (rev 15588)
@@ -153,7 +153,7 @@
*/
public final class Environment {
- public static final String VERSION = "3.2.4.sp1";
+ public static final String VERSION = "3.2.4.sp1.JBPAPP-1433";
/**
* <tt>ConnectionProvider</tt> implementor to use when obtaining connections
Modified: core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/src/org/hibernate/persister/entity/AbstractEntityPersister.java
===================================================================
--- core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/src/org/hibernate/persister/entity/AbstractEntityPersister.java 2008-11-19 05:26:06 UTC (rev 15587)
+++ core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/src/org/hibernate/persister/entity/AbstractEntityPersister.java 2008-11-19 08:18:58 UTC (rev 15588)
@@ -3088,7 +3088,7 @@
propsToUpdate[property] = true;
}
}
- if ( isVersioned() ) {
+ if ( isVersioned() && updateability[getVersionProperty() ]) {
propsToUpdate[ getVersionProperty() ] =
Versioning.isVersionIncrementRequired( dirtyProperties, hasDirtyCollection, getPropertyVersionability() );
}
16 years, 1 month
Hibernate SVN: r15587 - core/patches.
by hibernate-commits@lists.jboss.org
Author: dstephan
Date: 2008-11-19 00:26:06 -0500 (Wed, 19 Nov 2008)
New Revision: 15587
Added:
core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433/
Log:
Copied: core/patches/JBOSS_EAP_3_2_4_SP1_CP01_JBPAPP-1433 (from rev 15586, core/tags/JBOSS_EAP_3_2_4_SP1_CP01)
16 years, 1 month
Hibernate SVN: r15586 - search/trunk/src/java/org/hibernate/search/impl.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-18 12:01:26 -0500 (Tue, 18 Nov 2008)
New Revision: 15586
Modified:
search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java
Log:
Fixed typo
Modified: search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java 2008-11-18 15:16:27 UTC (rev 15585)
+++ search/trunk/src/java/org/hibernate/search/impl/SearchFactoryImpl.java 2008-11-18 17:01:26 UTC (rev 15586)
@@ -245,13 +245,13 @@
return documentBuilders;
}
- @SuppressWarnings( "unckecked" )
+ @SuppressWarnings( "unchecked" )
public <T> DocumentBuilder<T> getDocumentBuilder(Class<T> entityType) {
if (barrier != 0) { } //read barrier
return ( DocumentBuilder<T> ) documentBuilders.get( entityType );
}
- @SuppressWarnings( "unckecked" )
+ @SuppressWarnings( "unchecked" )
public <T> DocumentBuilder<T> getContainedInOnlyBuilder(Class<T> entityType) {
if (barrier != 0) { } //read barrier
return ( DocumentBuilder<T> ) containedInOnlyBuilders.get( entityType );
16 years, 1 month
Hibernate SVN: r15585 - in search/trunk: src/java/org/hibernate/search/annotations and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-18 10:16:27 -0500 (Tue, 18 Nov 2008)
New Revision: 15585
Modified:
search/trunk/ivy.xml
search/trunk/pom.xml
search/trunk/src/java/org/hibernate/search/annotations/AnalyzerDef.java
search/trunk/src/java/org/hibernate/search/annotations/TokenFilterDef.java
search/trunk/src/java/org/hibernate/search/annotations/TokenizerDef.java
search/trunk/src/test/org/hibernate/search/test/analyzer/solr/SolrAnalyzerTest.java
search/trunk/src/test/org/hibernate/search/test/analyzer/solr/Team.java
Log:
HSEARCH-297 - Updated test and fixed some javadoc
Modified: search/trunk/ivy.xml
===================================================================
--- search/trunk/ivy.xml 2008-11-18 11:46:19 UTC (rev 15584)
+++ search/trunk/ivy.xml 2008-11-18 15:16:27 UTC (rev 15585)
@@ -35,7 +35,8 @@
<dependency name="entitymanager" rev="3.4.0.GA" conf="test->default"/>
<dependency org="org.apache.lucene" name="lucene-snowball" rev="2.4.0" conf="test->default"/>
<dependency org="org.apache.lucene" name="lucene-analyzers" rev="2.4.0" conf="test->default"/>
- <dependency org="org.apache.commons" name="commons-codec" rev="1.3" conf="test->default"/>
+ <dependency org="org.apache.commons" name="commons-codec" rev="1.3" conf="test->default"/>
+ <dependency org="org.apache.commons" name="commons-io" rev="1.3.2" conf="test->default"/>
<dependency org="cglib" name="cglib" rev="2.1_3" conf="test->default"/>
<dependency org="asm" name="asm" rev="1.5.3" conf="test->default"/>
<dependency org="asm" name="asm-attrs" rev="1.5.3" conf="test->default"/>
Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml 2008-11-18 11:46:19 UTC (rev 15584)
+++ search/trunk/pom.xml 2008-11-18 15:16:27 UTC (rev 15585)
@@ -52,8 +52,6 @@
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
-
-
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
@@ -96,6 +94,12 @@
<version>1.3</version>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3.2</version>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
Modified: search/trunk/src/java/org/hibernate/search/annotations/AnalyzerDef.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/annotations/AnalyzerDef.java 2008-11-18 11:46:19 UTC (rev 15584)
+++ search/trunk/src/java/org/hibernate/search/annotations/AnalyzerDef.java 2008-11-18 15:16:27 UTC (rev 15585)
@@ -10,30 +10,32 @@
/**
* Reusable analyzer definition.
* An analyzer definition defines:
- * - one tokenizer
- * - optionally some filters
- * Filters are applied in the order they are defined
+ * <ul>
+ * <li>one tokenizer</li>
+ * </li>optionally one or more filters</li>
+ * </ul>
+ * Filters are applied in the order they are defined.
+ * <p/>
+ * Reuses the Solr Tokenizer and Filter architecture.
*
- * Reuses the Solr Tokenizer and Filter architecture
- *
* @author Emmanuel Bernard
*/
-@Retention( RetentionPolicy.RUNTIME )
-@Target( { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD} )
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
@Documented
public @interface AnalyzerDef {
/**
- * Reference name to be used on {#org.hibernate.search.annotations.Analyzer}
+ * @return Reference name to be used on {#org.hibernate.search.annotations.Analyzer}
*/
String name();
/**
- * Tokenizer used
+ * @return Tokenizer used.
*/
TokenizerDef tokenizer();
/**
- * Filters used. The filters are applied in the defined order
+ * @return Filters used. The filters are applied in the defined order
*/
- TokenFilterDef[] filters() default {};
+ TokenFilterDef[] filters() default { };
}
Modified: search/trunk/src/java/org/hibernate/search/annotations/TokenFilterDef.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/annotations/TokenFilterDef.java 2008-11-18 11:46:19 UTC (rev 15584)
+++ search/trunk/src/java/org/hibernate/search/annotations/TokenFilterDef.java 2008-11-18 15:16:27 UTC (rev 15585)
@@ -10,21 +10,21 @@
import org.apache.solr.analysis.TokenFilterFactory;
/**
- * Define a TokenFilterFactory and its parameters
+ * Define a <code>TokenFilterFactory</code> and its parameters.
*
* @author Emmanuel Bernard
*/
-@Retention( RetentionPolicy.RUNTIME )
-@Target( { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD } )
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
@Documented
public @interface TokenFilterDef {
/**
- * Defines the TokenFilterFactory implementation used
+ * @return the <code>TokenFilterFactory</code> class which shall be instantiated.
*/
public abstract Class<? extends TokenFilterFactory> factory();
/**
- * optional parameters passed to the TokenFilterFactory
+ * @return Optional parameters passed to the <code>TokenFilterFactory</code>.
*/
- public abstract Parameter[] params() default {};
+ public abstract Parameter[] params() default { };
}
\ No newline at end of file
Modified: search/trunk/src/java/org/hibernate/search/annotations/TokenizerDef.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/annotations/TokenizerDef.java 2008-11-18 11:46:19 UTC (rev 15584)
+++ search/trunk/src/java/org/hibernate/search/annotations/TokenizerDef.java 2008-11-18 15:16:27 UTC (rev 15585)
@@ -10,21 +10,22 @@
import org.apache.solr.analysis.TokenizerFactory;
/**
- * Define a TokenizerFactory and its parameters
- *
+ * Define a <code>TokenizerFactory</code> and its parameters.
+ *
* @author Emmanuel Bernard
*/
-@Retention( RetentionPolicy.RUNTIME )
-@Target( { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD} )
+(a)Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
@Documented
public @interface TokenizerDef {
+
/**
- * Defines the TokenizerFactory implementation used
+ * @return the <code>TokenizerFactory</code> class which shall be instantiated.
*/
Class<? extends TokenizerFactory> factory();
/**
- * optional parameters passed to the TokenizerFactory
+ * @return Optional parameters passed to the <code>TokenizerFactory</code>.
*/
- Parameter[] params() default {};
+ Parameter[] params() default { };
}
Modified: search/trunk/src/test/org/hibernate/search/test/analyzer/solr/SolrAnalyzerTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/analyzer/solr/SolrAnalyzerTest.java 2008-11-18 11:46:19 UTC (rev 15584)
+++ search/trunk/src/test/org/hibernate/search/test/analyzer/solr/SolrAnalyzerTest.java 2008-11-18 15:16:27 UTC (rev 15585)
@@ -146,6 +146,11 @@
tokens, new String[] { "0", "KK", "BRN", "FKS", "JMPT", "OFR", "0", "LS", "TKS" }
);
+ analyzer = fts.getSearchFactory().getAnalyzer( "pattern_analyzer" );
+ text = "foo,bar";
+ tokens = AnalyzerUtils.tokensFromAnalysis( analyzer, "name", text );
+ AnalyzerUtils.assertTokensEqual( tokens, new String[] { "foo", "bar" } );
+
fts.close();
}
Modified: search/trunk/src/test/org/hibernate/search/test/analyzer/solr/Team.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/analyzer/solr/Team.java 2008-11-18 11:46:19 UTC (rev 15584)
+++ search/trunk/src/test/org/hibernate/search/test/analyzer/solr/Team.java 2008-11-18 15:16:27 UTC (rev 15585)
@@ -21,6 +21,7 @@
import org.apache.solr.analysis.TrimFilterFactory;
import org.apache.solr.analysis.WordDelimiterFilterFactory;
import org.apache.solr.analysis.PhoneticFilterFactory;
+import org.apache.solr.analysis.PatternTokenizerFactory;
import org.hibernate.search.annotations.Analyzer;
import org.hibernate.search.annotations.AnalyzerDef;
@@ -53,6 +54,11 @@
})
}),
+ @AnalyzerDef(name = "pattern_analyzer",
+ tokenizer = @TokenizerDef(factory = PatternTokenizerFactory.class, params = {
+ @Parameter(name = "pattern", value = ",")
+ })),
+
@AnalyzerDef(name = "standard_analyzer",
tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),
filters = {
16 years, 1 month
Hibernate SVN: r15584 - search/trunk/src/test/org/hibernate/search/test/directoryProvider.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-18 06:46:19 -0500 (Tue, 18 Nov 2008)
New Revision: 15584
Modified:
search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlaveAndMasterDPTest.java
search/trunk/src/test/org/hibernate/search/test/directoryProvider/MultipleSFTestCase.java
Log:
HSEARCH-280 - turns out in postgres everythin has to happen in transactions
Modified: search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlaveAndMasterDPTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlaveAndMasterDPTest.java 2008-11-17 19:19:30 UTC (rev 15583)
+++ search/trunk/src/test/org/hibernate/search/test/directoryProvider/FSSlaveAndMasterDPTest.java 2008-11-18 11:46:19 UTC (rev 15584)
@@ -10,7 +10,8 @@
import org.slf4j.Logger;
import org.hibernate.Session;
-import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.HibernateException;
import org.hibernate.cfg.Configuration;
import org.hibernate.search.FullTextSession;
import org.hibernate.search.Search;
@@ -62,73 +63,85 @@
// assert that the salve index is empty
FullTextSession fullTextSession = Search.getFullTextSession( getSlaveSession() );
+ Transaction tx = fullTextSession.beginTransaction();
QueryParser parser = new QueryParser( "id", new StopAnalyzer() );
List result = fullTextSession.createFullTextQuery( parser.parse( "location:texas" ) ).list();
assertEquals( "No copy yet, fresh index expected", 0, result.size() );
+ tx.commit();
fullTextSession.close();
-
+
// create an entity on the master and persist it in order to index it
Session session = getMasterSession();
+ tx = session.beginTransaction();
SnowStorm sn = new SnowStorm();
sn.setDate( new Date() );
sn.setLocation( "Dallas, TX, USA" );
session.persist( sn );
- session.flush(); //we don' commit so we need to flush manually
+ tx.commit();
session.close();
int waitPeriodMilli = 2010; // wait a bit more than 2 refresh periods (one master / one slave) - 2 * 1 * 1000 + 10
Thread.sleep( waitPeriodMilli );
// assert that the master hass indexed the snowstorm
+ log.info( "Searching master" );
fullTextSession = Search.getFullTextSession( getMasterSession() );
+ tx = fullTextSession.beginTransaction();
result = fullTextSession.createFullTextQuery( parser.parse( "location:dallas" ) ).list();
assertEquals( "Original should get one", 1, result.size() );
+ tx.commit();
fullTextSession.close();
// assert that index got copied to the salve as well
- log.info("Searching slave");
+ log.info( "Searching slave" );
fullTextSession = Search.getFullTextSession( getSlaveSession() );
+ tx = fullTextSession.beginTransaction();
result = fullTextSession.createFullTextQuery( parser.parse( "location:dallas" ) ).list();
assertEquals( "First copy did not work out", 1, result.size() );
+ tx.commit();
fullTextSession.close();
// add a new snowstorm to the master
session = getMasterSession();
+ tx = session.beginTransaction();
sn = new SnowStorm();
sn.setDate( new Date() );
sn.setLocation( "Chennai, India" );
session.persist( sn );
- session.flush(); //we don' commit so we need to flush manually
+ tx.commit();
session.close();
Thread.sleep( waitPeriodMilli ); //wait a bit more than 2 refresh (one master / one slave)
// assert that the new snowstorm made it into the slave
+ log.info( "Searching slave" );
fullTextSession = Search.getFullTextSession( getSlaveSession() );
+ tx = fullTextSession.beginTransaction();
result = fullTextSession.createFullTextQuery( parser.parse( "location:chennai" ) ).list();
assertEquals( "Second copy did not work out", 1, result.size() );
+ tx.commit();
fullTextSession.close();
session = getMasterSession();
+ tx = session.beginTransaction();
sn = new SnowStorm();
sn.setDate( new Date() );
sn.setLocation( "Melbourne, Australia" );
session.persist( sn );
- session.flush(); //we don' commit so we need to flush manually
+ tx.commit();
session.close();
Thread.sleep( waitPeriodMilli ); //wait a bit more than 2 refresh (one master / one slave)
// once more - assert that the new snowstorm made it into the slave
- fullTextSession = Search.getFullTextSession( getSessionFactories()[1].openSession() );
+ log.info( "Searching slave" );
+ fullTextSession = Search.getFullTextSession( getSlaveSession() );
+ tx = fullTextSession.beginTransaction();
result = fullTextSession.createFullTextQuery( parser.parse( "location:melbourne" ) ).list();
assertEquals( "Third copy did not work out", 1, result.size() );
-
+ tx.commit();
fullTextSession.close();
- for ( SessionFactory sf : getSessionFactories() ) {
- sf.close();
- }
}
private Session getMasterSession() {
@@ -140,16 +153,29 @@
}
protected void setUp() throws Exception {
- root.mkdir();
+ if ( root.exists() ) {
+ FileHelper.delete( root );
+ }
+
+ if ( !root.mkdir() ) {
+ throw new HibernateException( "Unable to setup test directories" );
+ }
+
File master = new File( root, masterMain );
- master.mkdirs();
+ if ( !master.mkdirs() ) {
+ throw new HibernateException( "Unable to setup master directory" );
+ }
+
master = new File( root, masterCopy );
- master.mkdirs();
+ if ( !master.mkdirs() ) {
+ throw new HibernateException( "Unable to setup master copy directory" );
+ }
File slaveFile = new File( root, slave );
- slaveFile.mkdir();
-
+ if ( !slaveFile.mkdirs() ) {
+ throw new HibernateException( "Unable to setup slave directory" );
+ }
super.setUp();
}
Modified: search/trunk/src/test/org/hibernate/search/test/directoryProvider/MultipleSFTestCase.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/directoryProvider/MultipleSFTestCase.java 2008-11-17 19:19:30 UTC (rev 15583)
+++ search/trunk/src/test/org/hibernate/search/test/directoryProvider/MultipleSFTestCase.java 2008-11-18 11:46:19 UTC (rev 15584)
@@ -74,6 +74,12 @@
}
}
+ protected void tearDown() throws Exception {
+ for ( SessionFactory sf : getSessionFactories() ) {
+ sf.close();
+ }
+ }
+
protected abstract Class[] getMappings();
protected String[] getAnnotatedPackages() {
16 years, 1 month
Hibernate SVN: r15583 - search/patches.
by hibernate-commits@lists.jboss.org
Author: bmaxwell
Date: 2008-11-17 14:19:30 -0500 (Mon, 17 Nov 2008)
New Revision: 15583
Added:
search/patches/4.3.0.GA_CP02_FP01_JBPAPP-1412/
Log:
[JBPAPP-1412] one off patch for JBPAPP-1361 to fix HSEARCH-257 Ignore delete operation when Core does update then delete on the same entity
Copied: search/patches/4.3.0.GA_CP02_FP01_JBPAPP-1412 (from rev 15582, search/branches/Branch_3_0_1_GA_CP)
16 years, 1 month
Hibernate SVN: r15581 - search.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-11-17 11:58:04 -0500 (Mon, 17 Nov 2008)
New Revision: 15581
Added:
search/patches/
Log:
create patches branch
16 years, 1 month
Hibernate SVN: r15580 - search/tags.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2008-11-17 08:50:04 -0500 (Mon, 17 Nov 2008)
New Revision: 15580
Added:
search/tags/v3_1_0_CR1/
Log:
Created tag v3_1_0_CR1.
Copied: search/tags/v3_1_0_CR1 (from rev 15579, search/trunk)
16 years, 1 month
Hibernate SVN: r15579 - in search/trunk/src: test/org/hibernate/search/test/configuration and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: sannegrinovero
Date: 2008-11-17 08:37:10 -0500 (Mon, 17 Nov 2008)
New Revision: 15579
Modified:
search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java
search/trunk/src/test/org/hibernate/search/test/configuration/LuceneIndexingParametersTest.java
Log:
HSEARCH-298 just warn instead of exceptions when transaction.use_compound_file != batch.use_compound_file
Modified: search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java 2008-11-17 13:23:56 UTC (rev 15578)
+++ search/trunk/src/java/org/hibernate/search/backend/LuceneIndexingParameters.java 2008-11-17 13:37:10 UTC (rev 15579)
@@ -60,13 +60,13 @@
log.warn( "The max_field_length value configured for transaction is "
+ "different than the value configured for batch." );
}
+ Integer useCompoundTransaction = transParams.parameters.get( USE_COMPOUND_FILE );
+ Integer useCompoundBatch = batchParams.parameters.get( USE_COMPOUND_FILE );
+ if ( notEquals( useCompoundTransaction, useCompoundBatch ) ) {
+ log.warn( "The IndexWriter setting \"use_compound_file\" for batch "+
+ "mode can't be different from the transaction setting." );
+ }
}
- Integer useCompoundTransaction = transParams.parameters.get( USE_COMPOUND_FILE );
- Integer useCompoundBatch = batchParams.parameters.get( USE_COMPOUND_FILE );
- if ( notEquals( useCompoundTransaction, useCompoundBatch ) ) {
- throw new SearchException( "The IndexWriter setting \"use_compound_file\" for batch "+
- "mode can't be different from the transaction setting." );
- }
}
private boolean notEquals(Integer a, Integer b) {
Modified: search/trunk/src/test/org/hibernate/search/test/configuration/LuceneIndexingParametersTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/configuration/LuceneIndexingParametersTest.java 2008-11-17 13:23:56 UTC (rev 15578)
+++ search/trunk/src/test/org/hibernate/search/test/configuration/LuceneIndexingParametersTest.java 2008-11-17 13:37:10 UTC (rev 15579)
@@ -4,7 +4,6 @@
import java.io.IOException;
import java.util.Properties;
-import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.search.backend.LuceneIndexingParameters;
import org.hibernate.search.test.Document;
import org.hibernate.search.test.SerializationTestHelper;
@@ -29,7 +28,8 @@
super.configure( cfg );
cfg.setProperty( "hibernate.search.default.batch.ram_buffer_size", "1" );
- cfg.setProperty( "hibernate.search.default.transaction.use_compound_file", "true" );
+ cfg.setProperty( "hibernate.search.default.transaction.use_compound_file", "false" );
+ cfg.setProperty( "hibernate.search.default.batch.use_compound_file", "true" ); //should see a warning about this
//set by super : cfg.setProperty( "hibernate.search.default.batch.max_buffered_docs", "1000" );
cfg.setProperty( "hibernate.search.default.transaction.ram_buffer_size", "2" );
@@ -114,13 +114,6 @@
assertEquals( param.getTransactionIndexParameters(), paramCopy.getTransactionIndexParameters() );
}
- public void testInvalidConfiguration() {
- AnnotationConfiguration configuration = new AnnotationConfiguration();
- configuration.setProperty( "hibernate.search.default.transaction.use_compound_file", "true" );
- configuration.setProperty( "hibernate.search.default.batch.use_compound_file", "false" );
- assertCfgIsInvalid( configuration, getMappings() );
- }
-
protected Class[] getMappings() {
return new Class[] {
Book.class,
16 years, 1 month
Hibernate SVN: r15578 - search/trunk/doc/reference/en/modules.
by hibernate-commits@lists.jboss.org
Author: sannegrinovero
Date: 2008-11-17 08:23:56 -0500 (Mon, 17 Nov 2008)
New Revision: 15578
Modified:
search/trunk/doc/reference/en/modules/configuration.xml
Log:
HSEARCH-300 typos in reference
Modified: search/trunk/doc/reference/en/modules/configuration.xml
===================================================================
--- search/trunk/doc/reference/en/modules/configuration.xml 2008-11-17 13:22:20 UTC (rev 15577)
+++ search/trunk/doc/reference/en/modules/configuration.xml 2008-11-17 13:23:56 UTC (rev 15578)
@@ -803,8 +803,8 @@
<entry>The advantage of using the compound file format is that
less file descriptors are used. The disadvantage is that indexing
takes more time and temporary disk space. You can set this
- paramter to <literal>false</literal> in an attempt to improve the
- indexing time, but you risking running out of file descriptors if
+ parameter to <literal>false</literal> in an attempt to improve the
+ indexing time, but you could run out of file descriptors if
<literal>mergeFactor</literal> is also
large.<para></para><para>Boolean parameter, use
"<literal>true</literal>" or "<literal>false</literal>". The
16 years, 1 month