|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.search.index.impl.SearchIndexStorage
public class SearchIndexStorage
A simple multiplex class to enable configuration of the storage mecahnism in sakai.properties to use indexStorageName@org.sakaiproject.search.index.IndexStorage = filesystem indexStorageName@org.sakaiproject.search.index.IndexStorage = cluster indexStorageName@org.sakaiproject.search.index.IndexStorage = db recoverCorruptedIndex@org.sakaiproject.search.index.IndexStorage = false may cahnge, and it is worth looking in the components for the real values.
| Constructor Summary | |
|---|---|
SearchIndexStorage()
|
|
| Method Summary | |
|---|---|
void |
addReloadListener(IndexReloadListener indexReloadListener)
|
boolean |
centralIndexExists()
A fast method that checks if the index exists in the cluster without opening or loading the index. |
void |
closeIndexReader(org.apache.lucene.index.IndexReader indexReader)
This will close the index reader and release any locks |
void |
closeIndexSearcher(org.apache.lucene.search.IndexSearcher indexSearcher)
|
void |
closeIndexWriter(org.apache.lucene.index.IndexWriter indexWrite)
this will close the index reader and release any locks |
void |
disableDiagnostics()
|
void |
doPostIndexUpdate()
perform all operations necessary after an update cycle |
void |
doPreIndexUpdate()
perform all operations before an update cycle |
void |
enableDiagnostics()
|
void |
forceNextReload()
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer()
Get an analyzer correct for the indexer being used. |
Map |
getCurrentStores()
|
IndexStorage |
getDefaultIndexStorage()
|
org.apache.lucene.index.IndexReader |
getIndexReader()
get an Index Reader for the IndexStorage type |
org.apache.lucene.search.IndexSearcher |
getIndexSearcher(boolean reload)
get an index searcher |
String |
getIndexStorageName()
|
org.apache.lucene.index.IndexWriter |
getIndexWriter(boolean create)
get an index writer, and create if asked to |
long |
getLastLoad()
When the index was last loaded |
long |
getLastLoadTime()
The ammount of time (ms) that it took to load the index last time |
long |
getLastUpdate()
|
IndexStorage |
getRunningIndexStorage()
|
List |
getSegmentInfoList()
|
org.apache.lucene.store.Directory |
getSpellDirectory()
get the spell index directory |
boolean |
hasDiagnostics()
|
boolean |
indexExists()
Does the index exist |
void |
init()
|
boolean |
isMultipleIndexers()
Returns true if its ok to allow multiple indexers to run at the same time The index storage may manage its own locks. |
void |
removeReloadListener(IndexReloadListener indexReloadListener)
|
void |
setCurrentStores(Map currentStores)
|
void |
setDefaultIndexStorage(IndexStorage defaultIndexStorage)
|
void |
setIndexStorageName(String indexStorageName)
|
void |
setRecoverCorruptedIndex(boolean recover)
if set to true the IndexStorageWill automatically attempt to recover a corrupted index Not all IndexStorage implementations can do this, |
void |
setRunningIndexStorage(IndexStorage runningIndexStorage)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SearchIndexStorage()
| Method Detail |
|---|
public void init()
public org.apache.lucene.index.IndexReader getIndexReader()
throws IOException
IndexStorage
getIndexReader in interface IndexStorageIOException
public org.apache.lucene.index.IndexWriter getIndexWriter(boolean create)
throws IOException
IndexStorage
getIndexWriter in interface IndexStorageIOException
public void doPostIndexUpdate()
throws IOException
IndexStorage
doPostIndexUpdate in interface IndexStorageIOException
public void doPreIndexUpdate()
throws IOException
IndexStorage
doPreIndexUpdate in interface IndexStorageIOExceptionpublic boolean indexExists()
IndexStorage
indexExists in interface IndexStoragepublic org.apache.lucene.analysis.Analyzer getAnalyzer()
IndexStorage
getAnalyzer in interface IndexStoragepublic Map getCurrentStores()
public void setCurrentStores(Map currentStores)
currentStores - The currentStores to set.public IndexStorage getDefaultIndexStorage()
public void setDefaultIndexStorage(IndexStorage defaultIndexStorage)
defaultIndexStorage - The defaultIndexStorage to set.public String getIndexStorageName()
public void setIndexStorageName(String indexStorageName)
indexStorageName - The indexStorageName to set.public IndexStorage getRunningIndexStorage()
public void setRunningIndexStorage(IndexStorage runningIndexStorage)
runningIndexStorage - The runningIndexStorage to set.public void setRecoverCorruptedIndex(boolean recover)
IndexStorage
setRecoverCorruptedIndex in interface IndexStoragepublic long getLastUpdate()
getLastUpdate in interface IndexStoragepublic List getSegmentInfoList()
getSegmentInfoList in interface IndexStorage
public void closeIndexReader(org.apache.lucene.index.IndexReader indexReader)
throws IOException
IndexStorage
closeIndexReader in interface IndexStorageIOException
public void closeIndexWriter(org.apache.lucene.index.IndexWriter indexWrite)
throws IOException
IndexStorage
closeIndexWriter in interface IndexStorageIOExceptionpublic boolean isMultipleIndexers()
IndexStorage
isMultipleIndexers in interface IndexStoragepublic void closeIndexSearcher(org.apache.lucene.search.IndexSearcher indexSearcher)
closeIndexSearcher in interface IndexStoragepublic void disableDiagnostics()
disableDiagnostics in interface Diagnosablepublic void enableDiagnostics()
enableDiagnostics in interface Diagnosablepublic boolean hasDiagnostics()
hasDiagnostics in interface Diagnosablepublic boolean centralIndexExists()
IndexStorage
centralIndexExists in interface IndexStoragepublic void addReloadListener(IndexReloadListener indexReloadListener)
addReloadListener in interface IndexStoragepublic void forceNextReload()
forceNextReload in interface IndexStorage
public org.apache.lucene.search.IndexSearcher getIndexSearcher(boolean reload)
throws IOException
IndexStorage
getIndexSearcher in interface IndexStoragereload - force a reload of the searcher, if the implementation is caching a
searcher
IOExceptionpublic long getLastLoad()
IndexStorage
getLastLoad in interface IndexStoragepublic long getLastLoadTime()
IndexStorage
getLastLoadTime in interface IndexStoragepublic void removeReloadListener(IndexReloadListener indexReloadListener)
removeReloadListener in interface IndexStoragepublic org.apache.lucene.store.Directory getSpellDirectory()
IndexStorage
getSpellDirectory in interface IndexStorage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||