|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.query.lucene.MultiIndex
public class MultiIndex
A MultiIndex consists of a VolatileIndex and multiple
PersistentIndexes. The goal is to keep most parts of the index open
with index readers and write new index data to the volatile index. When
the volatile index reaches a certain size (see SearchIndex.setMinMergeDocs(int))
a new persistent index is created with the index data from the volatile index,
the same happens when the volatile index has been idle for some time (see
SearchIndex.setVolatileIdleTime(int)).
The new persistent index is then added to the list of already existing
persistent indexes. Further operations on the new persistent index will
however only require an IndexReader which serves for queries
but also for delete operations on the index.
SearchIndex.setMaxMergeDocs(int),
SearchIndex.setMergeFactor(int) and SearchIndex.setMinMergeDocs(int).
For detailed description of the configuration parameters see also the lucene
IndexWriter class.
This class is thread-safe.
Note on implementation: Multiple modifying threads are synchronized on a
MultiIndex instance itself. Sychronization between a modifying
thread and reader threads is done using updateMonitor and
updateInProgress.
| Nested Class Summary | |
|---|---|
static class |
MultiIndex.Action
Defines an action on an MultiIndex. |
| Method Summary | |
|---|---|
CachingMultiIndexReader |
getIndexReader()
Returns an read-only IndexReader that spans alls indexes of this
MultiIndex. |
CachingMultiIndexReader |
getIndexReader(boolean initCache)
Returns an read-only IndexReader that spans alls indexes of this
MultiIndex. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public CachingMultiIndexReader getIndexReader()
throws IOException
IndexReader that spans alls indexes of this
MultiIndex.
IndexReader.
IOException - if an error occurs constructing the IndexReader.
public CachingMultiIndexReader getIndexReader(boolean initCache)
throws IOException
IndexReader that spans alls indexes of this
MultiIndex.
initCache - when set true the hierarchy cache is
completely initialized before this call returns.
IndexReader.
IOException - if an error occurs constructing the IndexReader.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||