|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore
public class DefaultLuceneSearchEngineStore
| Constructor Summary | |
|---|---|
DefaultLuceneSearchEngineStore()
|
|
| Method Summary | |
|---|---|
String[] |
calcSubIndexes(String[] subIndexes,
String[] aliases)
Returns the sub indexes that intersect with the given sub indexes and aliases provided. |
String[] |
calcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types)
Returns the sub indexes the intersect with the given sub indexes and aliases provided. |
void |
cleanIndex(String subIndex)
Cleans the sub index. |
void |
cleanIndex(String subContext,
String subIndex)
|
void |
close()
Closes the store. |
void |
configure(LuceneSearchEngineFactory searchEngineFactory,
CompassSettings settings,
CompassMapping mapping)
Configures the store. |
void |
copyFrom(String subIndex,
LuceneSearchEngineStore searchEngineStore)
Copies the index from the given store into the current store. |
void |
copyFrom(String subContext,
String subIndex,
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 |
createIndex(String subIndex)
|
void |
createIndex(String subContext,
String subIndex)
|
void |
deleteIndex()
Deletes the index. |
void |
deleteIndex(String subIndex)
Deletes the index for the given sub index. |
void |
deleteIndex(String subContext,
String subIndex)
Deletes the index for the given sub context and sub index. |
String[] |
getAliasesBySubIndex(String subIndex)
Returns the list of aliases that are mapped for a given sub index. |
String |
getDefaultSubContext()
Returns the default sub context associated with this store. |
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 exists. |
boolean |
indexExists(String subIndex)
Returns true if the sub index index does exists as a legal Lucene index. |
boolean |
indexExists(String subContext,
String subIndex)
|
String[] |
internalCalcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types,
boolean poly)
|
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). |
boolean |
isLocked(String subContext,
String subIndex)
|
boolean |
isUseCompoundFile()
Should we use the compound file format or not. |
Directory |
openDirectory(String subIndex)
Returns the directory that match the given sub index. |
Directory |
openDirectory(String subContext,
String subIndex)
Returns the directory that match the given sub index. |
void |
performScheduledTasks()
Performs any scheduled tasks, managed by the index manager. |
String[] |
polyCalcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types)
Returns the sub indexes that intersect with the given sub indexes, aliases and types. |
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 |
releaseLock(String subContext,
String subIndex)
|
void |
releaseLocks()
Releases all the locks on all the sub indexes. |
boolean |
requiresAsyncTransactionalContext()
Returns true if a transaction needs to be started when performing operations
with this store. |
boolean |
subIndexExists(String subIndex)
Returns true if the sub index exists. |
String |
suggestedIndexDeletionPolicy()
Returns the suggested index deletion policy for the given store. |
boolean |
supportsConcurrentOperations()
Returns true if this store supports concurrent operations. |
String |
toString()
|
boolean |
verifyIndex()
Verify that the index exists. |
boolean |
verifyIndex(String subIndex)
|
boolean |
verifyIndex(String subContext,
String subIndex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLuceneSearchEngineStore()
| Method Detail |
|---|
public void configure(LuceneSearchEngineFactory searchEngineFactory,
CompassSettings settings,
CompassMapping mapping)
LuceneSearchEngineStore
configure in interface LuceneSearchEngineStorepublic void close()
LuceneSearchEngineStore
close in interface LuceneSearchEngineStorepublic void performScheduledTasks()
LuceneSearchEngineStore
performScheduledTasks in interface LuceneSearchEngineStorepublic String[] getAliasesBySubIndex(String subIndex)
LuceneSearchEngineStore
getAliasesBySubIndex in interface LuceneSearchEngineStorepublic int getNumberOfAliasesBySubIndex(String subIndex)
LuceneSearchEngineStore
getNumberOfAliasesBySubIndex in interface LuceneSearchEngineStorepublic String[] getSubIndexes()
LuceneSearchEngineStore
getSubIndexes in interface LuceneSearchEngineStorepublic boolean subIndexExists(String subIndex)
LuceneSearchEngineStoretrue if the sub index exists.
subIndexExists in interface LuceneSearchEngineStore
public String[] calcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types)
LuceneSearchEngineStore
calcSubIndexes in interface LuceneSearchEngineStore
public String[] polyCalcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types)
LuceneSearchEngineStore
polyCalcSubIndexes in interface LuceneSearchEngineStore
public String[] internalCalcSubIndexes(String[] subIndexes,
String[] aliases,
Class[] types,
boolean poly)
public String[] calcSubIndexes(String[] subIndexes,
String[] aliases)
LuceneSearchEngineStorenull,
return all the sub indexes.
calcSubIndexes in interface LuceneSearchEngineStore
public Directory openDirectory(String subIndex)
throws SearchEngineException
LuceneSearchEngineStore
openDirectory in interface LuceneSearchEngineStoreSearchEngineException
public Directory openDirectory(String subContext,
String subIndex)
throws SearchEngineException
LuceneSearchEngineStore
openDirectory in interface LuceneSearchEngineStoreSearchEngineException
public boolean indexExists()
throws SearchEngineException
LuceneSearchEngineStoretrue if one of the sub indexes index does exists.
indexExists in interface LuceneSearchEngineStoreSearchEngineException
public boolean indexExists(String subIndex)
throws SearchEngineException
LuceneSearchEngineStoretrue if the sub index index does exists as a legal Lucene index.
indexExists in interface LuceneSearchEngineStoreSearchEngineException
public boolean indexExists(String subContext,
String subIndex)
throws SearchEngineException
SearchEngineException
public void createIndex()
throws SearchEngineException
LuceneSearchEngineStore
createIndex in interface LuceneSearchEngineStoreSearchEngineException
public void createIndex(String subIndex)
throws SearchEngineException
SearchEngineException
public void createIndex(String subContext,
String subIndex)
throws SearchEngineException
SearchEngineException
public void deleteIndex()
throws SearchEngineException
LuceneSearchEngineStore
deleteIndex in interface LuceneSearchEngineStoreSearchEngineException
public void deleteIndex(String subIndex)
throws SearchEngineException
LuceneSearchEngineStore
deleteIndex in interface LuceneSearchEngineStoreSearchEngineException
public void deleteIndex(String subContext,
String subIndex)
throws SearchEngineException
LuceneSearchEngineStore
deleteIndex in interface LuceneSearchEngineStoreSearchEngineException
public boolean verifyIndex()
throws SearchEngineException
LuceneSearchEngineStore
verifyIndex in interface LuceneSearchEngineStoreSearchEngineException
public boolean verifyIndex(String subIndex)
throws SearchEngineException
SearchEngineException
public boolean verifyIndex(String subContext,
String subIndex)
throws SearchEngineException
SearchEngineException
public void cleanIndex(String subIndex)
throws SearchEngineException
LuceneSearchEngineStore
cleanIndex in interface LuceneSearchEngineStoreSearchEngineException
public void cleanIndex(String subContext,
String subIndex)
throws SearchEngineException
SearchEngineException
public boolean isLocked()
throws SearchEngineException
LuceneSearchEngineStoretrue if any sub index is locked.
isLocked in interface LuceneSearchEngineStoreSearchEngineException
public boolean isLocked(String subIndex)
throws SearchEngineException
LuceneSearchEngineStoretrue if the sub index is locked (both Lucene write and commit locks).
isLocked in interface LuceneSearchEngineStoreSearchEngineException
public boolean isLocked(String subContext,
String subIndex)
throws SearchEngineException
SearchEngineException
public void releaseLocks()
throws SearchEngineException
LuceneSearchEngineStore
releaseLocks in interface LuceneSearchEngineStoreSearchEngineException
public void releaseLock(String subIndex)
throws SearchEngineException
LuceneSearchEngineStore
releaseLock in interface LuceneSearchEngineStoreSearchEngineException
public void releaseLock(String subContext,
String subIndex)
throws SearchEngineException
SearchEngineException
public void copyFrom(String subIndex,
LuceneSearchEngineStore searchEngineStore)
throws SearchEngineException
LuceneSearchEngineStore
copyFrom in interface LuceneSearchEngineStoreSearchEngineException
public void copyFrom(String subContext,
String subIndex,
LuceneSearchEngineStore searchEngineStore)
throws SearchEngineException
LuceneSearchEngineStore
copyFrom in interface LuceneSearchEngineStoreSearchEngineException
public void registerEventListeners(SearchEngine searchEngine,
SearchEngineEventManager eventManager)
LuceneSearchEngineStoreSearchEngine is
created.
registerEventListeners in interface LuceneSearchEngineStoresearchEngine - The search engine createdeventManager - The event manager to register events withpublic boolean requiresAsyncTransactionalContext()
LuceneSearchEngineStoretrue if a transaction needs to be started when performing operations
with this store.
requiresAsyncTransactionalContext in interface LuceneSearchEngineStorepublic boolean supportsConcurrentOperations()
LuceneSearchEngineStoretrue if this store supports concurrent operations.
supportsConcurrentOperations in interface LuceneSearchEngineStorepublic boolean isUseCompoundFile()
LuceneSearchEngineStore
isUseCompoundFile in interface LuceneSearchEngineStorepublic String suggestedIndexDeletionPolicy()
LuceneSearchEngineStorenull if globabl settings should be applied.
suggestedIndexDeletionPolicy in interface LuceneSearchEngineStorepublic String getDefaultSubContext()
LuceneSearchEngineStore
getDefaultSubContext in interface LuceneSearchEngineStorepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||