public class LuceneIndexManager extends Object implements ConfluenceIndexManager
ConfluenceIndexManager.IndexQueueFlushMode
Modifier and Type | Field and Description |
---|---|
static String |
QUEUE_BATCH_SIZE_KEY |
Constructor and Description |
---|
LuceneIndexManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
flushQueue(IndexManager.IndexQueueFlushMode flushMode)
Flushes the index queue, processing a batch of the tasks
|
FlushStatistics |
getLastNonEmptyFlushStats() |
ReIndexTask |
getLastReindexingTask()
Retrieve the last reindexing task.
|
IndexTaskQueue |
getTaskQueue()
Retrieve the index task queue that is being used by Confluence.
|
boolean |
isFlushing()
Returns true if the the index queue is currently being flushed.
|
ReIndexTask |
reIndex(EnumSet<ReIndexOption> options)
Triggers a system wide reindex with specified options, entities are loaded from the database.
|
ReIndexTask |
reIndex(EnumSet<ReIndexOption> options,
SearchQuery searchQuery)
Trigger an asynchronous reindex of the system.
|
void |
resetIndexQueue()
Delete all of the entries on the index queue.
|
void |
setEventManager(com.atlassian.event.EventManager eventManager) |
void |
setIndexTaskPerformer(IndexTaskPerformer indexTaskPerformer) |
void |
setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection) |
void |
setReIndexer(ReIndexer reIndexer) |
void |
setSearchableDao(SearchableDao searchableDao) |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory) |
void |
setTaskQueue(IndexTaskQueue<ConfluenceIndexTask> taskQueue) |
void |
unIndexAll() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flushQueue, reIndex, reIndex
flushQueue, isReIndexing, reIndex
public static final String QUEUE_BATCH_SIZE_KEY
public void setIndexTaskPerformer(IndexTaskPerformer indexTaskPerformer)
public void setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection)
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
public void setTaskQueue(IndexTaskQueue<ConfluenceIndexTask> taskQueue)
taskQueue
- Set by dependency injection, requiredpublic IndexTaskQueue getTaskQueue()
getTaskQueue
in interface IndexManager
public void unIndexAll()
unIndexAll
in interface IndexManager
public void setEventManager(com.atlassian.event.EventManager eventManager)
eventManager
- Set by dependency injection, requiredpublic void setReIndexer(ReIndexer reIndexer)
reIndexer
- Set by dependency injection, requiredpublic void setSearchableDao(SearchableDao searchableDao)
searchableDao
- Set by dependency injection, requiredpublic boolean isFlushing()
IndexManager
isFlushing
in interface IndexManager
public boolean flushQueue(IndexManager.IndexQueueFlushMode flushMode)
IndexManager
flushQueue
in interface IndexManager
flushMode
- - whether to flush the entire queue, or just one batch of batchsize as specified by
the system property index.queue.batch.sizepublic void resetIndexQueue()
resetIndexQueue
in interface IndexManager
public ReIndexTask reIndex(EnumSet<ReIndexOption> options, SearchQuery searchQuery)
getLastReindexingTask()
.reIndex
in interface IndexManager
options
- Allows a subset of all searchable content to be re-indexed.searchQuery
- Optional. A lucene query that may be used to load the entities to be re-indexed. Pass null to
index all entities from the database.public ReIndexTask reIndex(EnumSet<ReIndexOption> options)
IndexManager
reIndex
in interface IndexManager
public ReIndexTask getLastReindexingTask()
getLastReindexingTask
in interface IndexManager
public FlushStatistics getLastNonEmptyFlushStats()
getLastNonEmptyFlushStats
in interface ConfluenceIndexManager
Copyright © 2003–2017 Atlassian. All rights reserved.