|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LuceneSearchEngineStore
Manages the mapping between aliases and their repective sub indexes. A Acts
as an abstration layer on top of the actual Lucene Directory
creation.
| Nested Class Summary | |
|---|---|
static interface |
LuceneSearchEngineStore.LuceneStoreCallback
|
| Method Summary | |
|---|---|
String[] |
calcSubIndexes(String[] subIndexes,
String[] aliases)
Returns the sub indexes that intersect with the given sub indexes and aliases provided. |
void |
close()
Closes the store. |
void |
closeDirectory(String subIndex,
Directory dir)
Closes the given directory. |
void |
configure(LuceneSearchEngineFactory searchEngineFactory,
CompassSettings settings,
CompassMapping mapping)
Configures the store. |
void |
copyFrom(LuceneSearchEngineStore searchEngineStore)
Copies the index from the given store into the current store. |
void |
createIndex()
Creates the index (if it is already exists, delets it first). |
void |
deleteIndex()
Deletes the index. |
Directory |
getDirectoryBySubIndex(String subIndex,
boolean create)
Returns the directory that match the given sub index. |
LuceneSettings |
getLuceneSettings()
Returns the lucene settings. |
int |
getNumberOfAliasesBySubIndex(String subIndex)
Returns the number of aliases that map to the given sub index. |
String[] |
getSubIndexes()
Returns all the sub indexes defined within the store. |
boolean |
indexExists()
Returns true if one of the sub indexes index does not
exists. |
boolean |
isLocked()
Returns true if any sub index is locked. |
boolean |
isLocked(String subIndex)
Returns true if the sub index is locked (both Lucene write and commit locks). |
void |
performScheduledTasks()
Performs any scheduled tasks, managed by the index manager. |
void |
registerEventListeners(SearchEngine searchEngine,
SearchEngineEventManager eventManager)
A callback to register event listeners when a SearchEngine is
created. |
void |
releaseLock(String subIndex)
Releases the lock for the given sub index. |
void |
releaseLocks()
Releases all the locks on all the sub indexes. |
boolean |
verifyIndex()
Verify that the index exists. |
| Method Detail |
|---|
void configure(LuceneSearchEngineFactory searchEngineFactory,
CompassSettings settings,
CompassMapping mapping)
void close()
void performScheduledTasks()
String[] getSubIndexes()
int getNumberOfAliasesBySubIndex(String subIndex)
void closeDirectory(String subIndex,
Directory dir)
throws SearchEngineException
SearchEngineException
Directory getDirectoryBySubIndex(String subIndex,
boolean create)
throws SearchEngineException
SearchEngineException
boolean isLocked()
throws SearchEngineException
true if any sub index is locked.
SearchEngineException
boolean isLocked(String subIndex)
throws SearchEngineException
true if the sub index is locked (both Lucene write and commit locks).
SearchEngineException
void releaseLocks()
throws SearchEngineException
SearchEngineException
void releaseLock(String subIndex)
throws SearchEngineException
SearchEngineException
void deleteIndex()
throws SearchEngineException
SearchEngineException
void createIndex()
throws SearchEngineException
SearchEngineException
boolean verifyIndex()
throws SearchEngineException
SearchEngineException
boolean indexExists()
throws SearchEngineException
true if one of the sub indexes index does not
exists.
SearchEngineException
String[] calcSubIndexes(String[] subIndexes,
String[] aliases)
null,
return all the sub indexes.
void copyFrom(LuceneSearchEngineStore searchEngineStore)
throws SearchEngineException
searchEngineStore - The store to copy from
SearchEngineException
void registerEventListeners(SearchEngine searchEngine,
SearchEngineEventManager eventManager)
SearchEngine is
created.
searchEngine - The search engine createdeventManager - The event manager to register events withLuceneSettings getLuceneSettings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||