|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.index.IndexReader org.apache.lucene.index.FilterIndexReader org.apache.lucene.index.MultiPassIndexSplitter.FakeDeleteIndexReader
public static class MultiPassIndexSplitter.FakeDeleteIndexReader
This class pretends that it can write deletions to the underlying index. Instead, deletions are buffered in a bitset and overlaid with the original list of deletions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.index.FilterIndexReader |
---|
FilterIndexReader.FilterTermDocs, FilterIndexReader.FilterTermEnum, FilterIndexReader.FilterTermPositions |
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader |
---|
IndexReader.FieldOption, IndexReader.ReaderFinishedListener |
Field Summary |
---|
Fields inherited from class org.apache.lucene.index.FilterIndexReader |
---|
in |
Fields inherited from class org.apache.lucene.index.IndexReader |
---|
hasChanges, readerFinishedListeners |
Constructor Summary | |
---|---|
MultiPassIndexSplitter.FakeDeleteIndexReader(IndexReader in)
|
Method Summary | |
---|---|
protected void |
doDelete(int n)
Implements deletion of the document numbered docNum . |
protected void |
doUndeleteAll()
Just removes our overlaid deletions - does not undelete the original deletions. |
IndexReader[] |
getSequentialSubReaders()
Expert: returns the sequential sub readers that this reader is logically composed of. |
boolean |
hasDeletions()
Returns true if any documents have been deleted |
boolean |
isDeleted(int n)
Returns true if document n has been deleted |
int |
numDocs()
Returns the number of documents in this index. |
TermPositions |
termPositions()
Returns an unpositioned TermPositions enumerator. |
Methods inherited from class org.apache.lucene.index.FilterIndexReader |
---|
addReaderFinishedListener, directory, docFreq, doClose, doCommit, document, doSetNorm, getCoreCacheKey, getDeletesCacheKey, getFieldNames, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, getVersion, hasNorms, isCurrent, isOptimized, maxDoc, norms, norms, removeReaderFinishedListener, termDocs, termDocs, terms, terms, toString |
Methods inherited from class org.apache.lucene.index.IndexReader |
---|
acquireWriteLock, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCurrentVersion, getIndexCommit, getRefCount, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, lastModified, listCommits, main, notifyReaderFinishedListeners, numDeletedDocs, open, open, open, open, open, open, open, open, readerFinished, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, undeleteAll |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiPassIndexSplitter.FakeDeleteIndexReader(IndexReader in)
Method Detail |
---|
public int numDocs()
IndexReader
numDocs
in class FilterIndexReader
protected void doUndeleteAll() throws CorruptIndexException, IOException
doUndeleteAll
in class FilterIndexReader
CorruptIndexException
IOException
protected void doDelete(int n) throws CorruptIndexException, IOException
IndexReader
docNum
.
Applications should call IndexReader.deleteDocument(int)
or IndexReader.deleteDocuments(Term)
.
doDelete
in class FilterIndexReader
CorruptIndexException
IOException
public boolean hasDeletions()
IndexReader
hasDeletions
in class FilterIndexReader
public boolean isDeleted(int n)
IndexReader
isDeleted
in class FilterIndexReader
public IndexReader[] getSequentialSubReaders()
IndexReader
NOTE: You should not try using sub-readers returned by
this method to make any changes (setNorm, deleteDocument,
etc.). While this might succeed for one composite reader
(like MultiReader), it will most likely lead to index
corruption for other readers (like DirectoryReader obtained
through IndexReader.open(org.apache.lucene.store.Directory)
. Use the parent reader directly.
getSequentialSubReaders
in class FilterIndexReader
public TermPositions termPositions() throws IOException
IndexReader
TermPositions
enumerator.
termPositions
in class FilterIndexReader
IOException
- if there is a low-level IO error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |