com.atlassian.confluence.search.lucene
Class MultiThreadedIndexRebuilder

java.lang.Object
  extended by com.atlassian.confluence.search.lucene.MultiThreadedIndexRebuilder
All Implemented Interfaces:
com.atlassian.bonnie.search.BatchIndexer, IndexRebuilder

public class MultiThreadedIndexRebuilder
extends java.lang.Object
implements IndexRebuilder

Performs a rebuild the Confluence index using multithreaded approach. The index is first rebuilt into a temporary location, with each thread writing to its own temporary file. Once all workers have completed their respective indexing jobs, we merge all temporary file indexes together, truncate/delete the main index and then merge and promote the temporary index to be the main search index.


Constructor Summary
MultiThreadedIndexRebuilder()
           
 
Method Summary
 IndexingTask getLastReindexingTask()
          Retrieve the latest reindexing task.
 void indexEntities(com.atlassian.core.util.ProgressMeter progress)
           
 boolean isReIndexRunning()
          Returns true if a full content reindex is currently running, false otherwise.
 void reIndexAll()
          Trigger a full content reindex.
 void setAnalyzerFactory(com.atlassian.bonnie.analyzer.LuceneAnalyzerFactory analyzerFactory)
           
 void setAnyTypeDao(AnyTypeDao anyTypeDao)
           
 void setBootstrapManager(BootstrapManager bootstrapManager)
           
 void setEventManager(com.atlassian.event.EventManager eventManager)
           
 void setIndexTaskFactory(IndexTaskFactory indexTaskFactory)
           
 void setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection)
           
 void setSearchableDao(SearchableDao searchableDao)
           
 void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 void unIndexAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiThreadedIndexRebuilder

public MultiThreadedIndexRebuilder()
Method Detail

reIndexAll

public void reIndexAll()
Description copied from interface: IndexRebuilder
Trigger a full content reindex.

Specified by:
reIndexAll in interface IndexRebuilder

indexEntities

public void indexEntities(com.atlassian.core.util.ProgressMeter progress)
Specified by:
indexEntities in interface com.atlassian.bonnie.search.BatchIndexer

unIndexAll

public void unIndexAll()
Specified by:
unIndexAll in interface com.atlassian.bonnie.search.BatchIndexer

isReIndexRunning

public boolean isReIndexRunning()
Description copied from interface: IndexRebuilder
Returns true if a full content reindex is currently running, false otherwise.

Specified by:
isReIndexRunning in interface IndexRebuilder

getLastReindexingTask

public IndexingTask getLastReindexingTask()
Description copied from interface: IndexRebuilder
Retrieve the latest reindexing task. This task can be queries for the progress of the indexing amongst other things.

Specified by:
getLastReindexingTask in interface IndexRebuilder
Returns:
the latest reindexing task or null if no full re-index has run.

setEventManager

public void setEventManager(com.atlassian.event.EventManager eventManager)

setAnalyzerFactory

public void setAnalyzerFactory(com.atlassian.bonnie.analyzer.LuceneAnalyzerFactory analyzerFactory)

setSearchableDao

public void setSearchableDao(SearchableDao searchableDao)

setBootstrapManager

public void setBootstrapManager(BootstrapManager bootstrapManager)

setLuceneConnection

public void setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection)

setIndexTaskFactory

public void setIndexTaskFactory(IndexTaskFactory indexTaskFactory)

setAnyTypeDao

public void setAnyTypeDao(AnyTypeDao anyTypeDao)

setTransactionManager

public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.