org.compass.core.lucene.engine.manager
Interface LuceneSearchEngineIndexManager

All Superinterfaces:
SearchEngineIndexManager
All Known Implementing Classes:
DefaultLuceneSearchEngineIndexManager, ScheduledLuceneSearchEngineIndexManager

public interface LuceneSearchEngineIndexManager
extends SearchEngineIndexManager

Specialized Lucene index manager extension.

Author:
kimchy

Nested Class Summary
static class LuceneSearchEngineIndexManager.LuceneIndexHolder
           
 
Nested classes/interfaces inherited from interface org.compass.core.engine.SearchEngineIndexManager
SearchEngineIndexManager.IndexOperationCallback, SearchEngineIndexManager.ReplaceIndexCallback
 
Method Summary
 void closeIndexWriter(String subIndex, IndexWriter indexWriter, Directory dir)
           
 void compoundIndex()
          Compounds the index.
 LuceneSettings getSettings()
           
 LuceneSearchEngineStore getStore()
           
 boolean isIndexCompound()
          Returns true if the index is in a compound form.
 boolean isIndexUnCompound()
          Returns true if the index is in a none compound form.
 LuceneSearchEngineIndexManager.LuceneIndexHolder openIndexHolderBySubIndex(String subIndex)
           
 IndexWriter openIndexWriter(Directory dir, boolean create)
           
 void performScheduledTasks()
           
 void setWaitForCacheInvalidationBeforeSecondStep(long timeToWaitInMillis)
          Since there might be several instances of Compass running against the same index, they need to be globally notified to invalidate the cache after the commit lock has been obtained for the second step on the SearchEngineIndexManager.operate(org.compass.core.engine.SearchEngineIndexManager.IndexOperationCallback) or SearchEngineIndexManager.replaceIndex(org.compass.core.engine.SearchEngineIndexManager, org.compass.core.engine.SearchEngineIndexManager.ReplaceIndexCallback).
 void unCompoundIndex()
          Uncompounds the index.
 
Methods inherited from interface org.compass.core.engine.SearchEngineIndexManager
checkAndClearIfNotifiedAllToClearCache, clearCache, clearCache, close, createIndex, deleteIndex, indexExists, isCached, isCached, isLocked, isLocked, isRunning, notifyAllToClearCache, operate, releaseLock, releaseLocks, replaceIndex, start, stop, verifyIndex
 

Method Detail

getSettings

LuceneSettings getSettings()

getStore

LuceneSearchEngineStore getStore()

openIndexWriter

IndexWriter openIndexWriter(Directory dir,
                            boolean create)
                            throws IOException
Throws:
IOException

closeIndexWriter

void closeIndexWriter(String subIndex,
                      IndexWriter indexWriter,
                      Directory dir)
                      throws SearchEngineException
Throws:
SearchEngineException

openIndexHolderBySubIndex

LuceneSearchEngineIndexManager.LuceneIndexHolder openIndexHolderBySubIndex(String subIndex)
                                                                           throws SearchEngineException
Throws:
SearchEngineException

setWaitForCacheInvalidationBeforeSecondStep

void setWaitForCacheInvalidationBeforeSecondStep(long timeToWaitInMillis)
Since there might be several instances of Compass running against the same index, they need to be globally notified to invalidate the cache after the commit lock has been obtained for the second step on the SearchEngineIndexManager.operate(org.compass.core.engine.SearchEngineIndexManager.IndexOperationCallback) or SearchEngineIndexManager.replaceIndex(org.compass.core.engine.SearchEngineIndexManager, org.compass.core.engine.SearchEngineIndexManager.ReplaceIndexCallback).

If directly set to 0, will not wait.

This one will default to the ScheduledLuceneSearchEngineIndexManager interval.

Parameters:
timeToWaitInMillis -

isIndexCompound

boolean isIndexCompound()
                        throws SearchEngineException
Returns true if the index is in a compound form. Will return true if the index is empty or it does not exists.

Throws:
SearchEngineException

isIndexUnCompound

boolean isIndexUnCompound()
                          throws SearchEngineException
Returns true if the index is in a none compound form. Will return true if the index is empty or it does not exists.

Throws:
SearchEngineException

compoundIndex

void compoundIndex()
                   throws SearchEngineException
Compounds the index.

Throws:
SearchEngineException

unCompoundIndex

void unCompoundIndex()
                     throws SearchEngineException
Uncompounds the index.

Throws:
SearchEngineException

performScheduledTasks

void performScheduledTasks()
                           throws SearchEngineException
Throws:
SearchEngineException


Copyright (c) 2004-2006 The Compass Project.