Author: sannegrinovero
Date: 2009-04-13 19:29:04 -0400 (Mon, 13 Apr 2009)
New Revision: 16312
Modified:
search/trunk/readme.txt
search/trunk/src/main/java/org/hibernate/search/backend/BackendQueueProcessorFactory.java
search/trunk/src/main/java/org/hibernate/search/backend/Workspace.java
search/trunk/src/main/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/DpSelectionDelegate.java
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/PerDPResources.java
search/trunk/src/main/java/org/hibernate/search/engine/DocumentBuilderIndexedEntity.java
search/trunk/src/main/java/org/hibernate/search/engine/DocumentExtractor.java
search/trunk/src/main/java/org/hibernate/search/engine/EntityInfo.java
search/trunk/src/main/java/org/hibernate/search/event/FullTextIndexEventListener.java
search/trunk/src/main/java/org/hibernate/search/filter/FilterOptimizationHelper.java
search/trunk/src/main/java/org/hibernate/search/impl/FullTextSessionImpl.java
search/trunk/src/main/java/org/hibernate/search/impl/SolrAnalyzerBuilder.java
Log:
typos in comments/docs and removal of TODOs which don't appply any more
Modified: search/trunk/readme.txt
===================================================================
--- search/trunk/readme.txt 2009-04-13 22:52:23 UTC (rev 16311)
+++ search/trunk/readme.txt 2009-04-13 23:29:04 UTC (rev 16312)
@@ -6,7 +6,7 @@
-----------
Full text search engines like Apache Lucene(tm) are a very powerful technology to
-bring free text/efficient queries to applications. If suffers several mismatches
+bring free text/efficient queries to applications. It suffers several mismatches
when dealing with a object domain model (keeping the index up to date, mismatch
between the index structure and the domain model, ...)
Hibernate Search indexes your domain model thanks to a few annotations, takes
Modified:
search/trunk/src/main/java/org/hibernate/search/backend/BackendQueueProcessorFactory.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/backend/BackendQueueProcessorFactory.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/backend/BackendQueueProcessorFactory.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -31,7 +31,7 @@
/**
* Used to shutdown and eventually release resources.
- * no other method should used after this one.
+ * No other method should be used after this one.
*/
void close();
Modified: search/trunk/src/main/java/org/hibernate/search/backend/Workspace.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/backend/Workspace.java 2009-04-13
22:52:23 UTC (rev 16311)
+++ search/trunk/src/main/java/org/hibernate/search/backend/Workspace.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -76,7 +76,7 @@
}
/**
- * If optimization has not been forced give a change to configured OptimizerStrategy
+ * If optimization has not been forced give a chance to configured OptimizerStrategy
* to optimize the index.
* To enter the optimization phase you need to acquire the lock first.
* @throws AssertionFailure if the lock is not owned.
Modified:
search/trunk/src/main/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/backend/impl/BatchedQueueingProcessor.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -169,7 +169,6 @@
}
}
- //TODO implements parallel batchWorkers (one per Directory)
public void performWorks(WorkQueue workQueue) {
Runnable processor = backendQueueProcessorFactory.getProcessor(
workQueue.getSealedQueue() );
if ( sync ) {
Modified:
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/DpSelectionDelegate.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/DpSelectionDelegate.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/DpSelectionDelegate.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -12,7 +12,7 @@
* The LuceneWork must be applied to different indexes.
* @param work the work to split.
* @param queues the target queue to add work to.
- * @param shardingStrategy the Sharding strategy is usually needed to indetify affected
Directories.
+ * @param shardingStrategy the Sharding strategy is usually needed to identify affected
Directories.
*/
void addAsPayLoadsToQueue(LuceneWork work,
IndexShardingStrategy shardingStrategy, QueueProcessors queues);
Modified:
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/PerDPResources.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/PerDPResources.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/backend/impl/lucene/PerDPResources.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -8,6 +8,12 @@
import org.hibernate.search.engine.SearchFactoryImplementor;
import org.hibernate.search.store.DirectoryProvider;
+/**
+ * Collects all resources needed to apply changes to one index,
+ * and are reused across several WorkQueues.
+ *
+ * @author Sanne Grinovero
+ */
class PerDPResources {
private final ExecutorService executor;
Modified:
search/trunk/src/main/java/org/hibernate/search/engine/DocumentBuilderIndexedEntity.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/engine/DocumentBuilderIndexedEntity.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/engine/DocumentBuilderIndexedEntity.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -341,7 +341,7 @@
*
* @param instance The entity for which to build the matching Lucene
<code>Document</code>
* @param id the entity id.
- * @param fieldToAnalyzerMap this maps gets populated while generateing the
<code>Document</code>.
+ * @param fieldToAnalyzerMap this maps gets populated while generating the
<code>Document</code>.
* It allows to specify for any document field a named analyzer to use. This parameter
cannot be <code>null</code>.
*
* @return The Lucene <code>Document</code> for the specified entity.
@@ -479,7 +479,7 @@
value = ReflectionHelper.getMemberValue( unproxiedInstance,
propertiesMetadata.discriminatorGetter );
}
- // now we give the discriminator the oppertunity to specify a analyzer per field level
+ // now we give the discriminator the opportunity to specify a analyzer per field level
for ( Object o : doc.getFields() ) {
Field field = ( Field ) o;
if ( !processedFieldNames.contains( field.name() ) ) {
Modified: search/trunk/src/main/java/org/hibernate/search/engine/DocumentExtractor.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/engine/DocumentExtractor.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/engine/DocumentExtractor.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -13,7 +13,6 @@
import org.apache.lucene.document.FieldSelector;
import org.hibernate.search.ProjectionConstants;
-import org.hibernate.search.SearchException;
import org.hibernate.search.query.QueryHits;
/**
Modified: search/trunk/src/main/java/org/hibernate/search/engine/EntityInfo.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/engine/EntityInfo.java 2009-04-13
22:52:23 UTC (rev 16311)
+++ search/trunk/src/main/java/org/hibernate/search/engine/EntityInfo.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -9,7 +9,6 @@
*
* @author Emmanuel Bernard
*/
-//TODO Move to egine?
public class EntityInfo {
public final Class clazz;
Modified:
search/trunk/src/main/java/org/hibernate/search/event/FullTextIndexEventListener.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/event/FullTextIndexEventListener.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/event/FullTextIndexEventListener.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -123,7 +123,7 @@
}
}
- protected <T> void processWork(T entity, Serializable id, WorkType workType,
AbstractEvent event) {
+ protected <T> void processWork(T entity, Serializable id, WorkType workType,
AbstractEvent event) {
Work<T> work = new Work<T>( entity, id, workType );
final EventSourceTransactionContext transactionContext = new
EventSourceTransactionContext( event.getSession() );
searchFactoryImplementor.getWorker().performWork( work, transactionContext );
Modified:
search/trunk/src/main/java/org/hibernate/search/filter/FilterOptimizationHelper.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/filter/FilterOptimizationHelper.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/filter/FilterOptimizationHelper.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -21,7 +21,7 @@
* Returns a new list of DocIdSet, applying binary AND
* on all DocIdSet implemented by using BitSet or OpenBitSet.
* @param docIdSets
- * @return the same list if not change was done
+ * @return the same list if no changes were done
*/
public static List<DocIdSet> mergeByBitAnds(List<DocIdSet> docIdSets) {
int size = docIdSets.size();
Modified: search/trunk/src/main/java/org/hibernate/search/impl/FullTextSessionImpl.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/impl/FullTextSessionImpl.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/impl/FullTextSessionImpl.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -119,7 +119,7 @@
Work<T> work;
for ( Class clazz : targetedClasses ) {
if ( id == null ) {
- work = new Work<T>( clazz, id, WorkType.PURGE_ALL );
+ work = new Work<T>( clazz, null, WorkType.PURGE_ALL );
searchFactoryImplementor.getWorker().performWork( work, transactionContext );
}
else {
Modified: search/trunk/src/main/java/org/hibernate/search/impl/SolrAnalyzerBuilder.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/impl/SolrAnalyzerBuilder.java 2009-04-13
22:52:23 UTC (rev 16311)
+++
search/trunk/src/main/java/org/hibernate/search/impl/SolrAnalyzerBuilder.java 2009-04-13
23:29:04 UTC (rev 16312)
@@ -21,7 +21,7 @@
/**
* Instances of this class are used to build Lucene analyzers which are defined using the
solr <code>TokenFilterFactory</code>.
* To make the dependency to the solr framework optional only this class has direct
dependecies to solr. Solr dependencies
- * are not supposed to be used anywhere else (except the actual configuration of the
analzers in the domain model).
+ * are not supposed to be used anywhere else (except the actual configuration of the
analyzers in the domain model).
*
* @author Emmanuel Bernard
* @author Hardy Ferentschik