Author: sannegrinovero
Date: 2009-05-16 05:57:32 -0400 (Sat, 16 May 2009)
New Revision: 16576
Removed:
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/IndexInteractionType.java
Modified:
search/trunk/src/main/java/org/hibernate/search/store/DirectoryProviderFactory.java
search/trunk/src/test/java/org/hibernate/search/test/query/boost/FieldBoostTest.java
Log:
removing dead code, better error message for DirectoryProviderFactory
Deleted:
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/IndexInteractionType.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/IndexInteractionType.java 2009-05-16
09:54:26 UTC (rev 16575)
+++
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/IndexInteractionType.java 2009-05-16
09:57:32 UTC (rev 16576)
@@ -1,31 +0,0 @@
-package org.hibernate.search.backend.impl.lucene;
-
-/**
- * Constants to make the LuceneWorkDelegates advertise the type
- * of resource they are going to need to perform the work.
- *
- * NEEDS_INDEXREADER is missing to make sure there always is an optimal
- * solution, as some operations can be done both through an IndexReader
- * and an IndexWriter, but as of Lucene 2.4 there are no operations which
- * can't be done using an IndexWriter.
- *
- * @author Sanne Grinovero
- */
-public enum IndexInteractionType {
-
- /**
- * The workType needs an IndexWriter.
- */
- NEEDS_INDEXWRITER,
- /**
- * An IndexWriter should work best but it's possible
- * to use an IndexReader instead.
- */
- PREFER_INDEXWRITER,
- /**
- * An IndexReader should work best but it's possible
- * to use an IndexWriter instead.
- */
- PREFER_INDEXREADER
-
-}
Modified:
search/trunk/src/main/java/org/hibernate/search/store/DirectoryProviderFactory.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/store/DirectoryProviderFactory.java 2009-05-16
09:54:26 UTC (rev 16575)
+++
search/trunk/src/main/java/org/hibernate/search/store/DirectoryProviderFactory.java 2009-05-16
09:57:32 UTC (rev 16576)
@@ -129,7 +129,7 @@
provider.initialize( directoryProviderName, indexProps, searchFactoryImplementor );
}
catch (Exception e) {
- throw new SearchException( "Unable to initialize: " + directoryProviderName,
e );
+ throw new SearchException( "Unable to initialize directory provider: " +
directoryProviderName, e );
}
int index = providers.indexOf( provider );
if ( index != -1 ) {
Modified:
search/trunk/src/test/java/org/hibernate/search/test/query/boost/FieldBoostTest.java
===================================================================
---
search/trunk/src/test/java/org/hibernate/search/test/query/boost/FieldBoostTest.java 2009-05-16
09:54:26 UTC (rev 16575)
+++
search/trunk/src/test/java/org/hibernate/search/test/query/boost/FieldBoostTest.java 2009-05-16
09:57:32 UTC (rev 16576)
@@ -140,7 +140,6 @@
l.setDescription( "Scientist discovers invisibility and becomes insane." );
session.save( l );
- session.save( l );
l = new BoostedDescriptionLibrary();
l.setAuthor( "H.G. Wells" );
l.setTitle( "War of the Worlds" );
@@ -158,7 +157,6 @@
l.setDescription( "Scientist discovers invisibility and becomes insane." );
session.save( l );
- session.save( l );
l = new BoostedFieldDescriptionLibrary();
l.setAuthor( "H.G. Wells" );
l.setTitle( "War of the Worlds" );
@@ -176,7 +174,6 @@
l.setDescription( "Scientist discovers invisibility and becomes insane." );
session.save( l );
- session.save( l );
l = new BoostedGetDescriptionLibrary();
l.setAuthor( "H.G. Wells" );
l.setTitle( "War of the Worlds" );
Show replies by date