org.apache.lucene.index
Class MultiPassIndexSplitter.FakeDeleteIndexReader
java.lang.Object
org.apache.lucene.index.IndexReader
org.apache.lucene.index.FilterIndexReader
org.apache.lucene.index.MultiPassIndexSplitter.FakeDeleteIndexReader
- All Implemented Interfaces:
- Closeable, Cloneable
- Enclosing class:
- MultiPassIndexSplitter
public static class MultiPassIndexSplitter.FakeDeleteIndexReader
- extends FilterIndexReader
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.
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. |
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 |
directory, docFreq, doClose, doCommit, document, doSetNorm, getFieldNames, getSequentialSubReaders, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, getVersion, hasNorms, isCurrent, isOptimized, maxDoc, norms, norms, termDocs, termDocs, terms, terms |
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, getFieldCacheKey, getIndexCommit, getRefCount, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, lastModified, listCommits, main, numDeletedDocs, open, open, open, open, open, open, open, reopen, reopen, reopen, setNorm, setNorm, termPositions, undeleteAll |
MultiPassIndexSplitter.FakeDeleteIndexReader
public MultiPassIndexSplitter.FakeDeleteIndexReader(IndexReader in)
numDocs
public int numDocs()
- Description copied from class:
IndexReader
- Returns the number of documents in this index.
- Overrides:
numDocs
in class FilterIndexReader
doUndeleteAll
protected void doUndeleteAll()
throws CorruptIndexException,
IOException
- Just removes our overlaid deletions - does not undelete the original
deletions.
- Overrides:
doUndeleteAll
in class FilterIndexReader
- Throws:
CorruptIndexException
IOException
doDelete
protected void doDelete(int n)
throws CorruptIndexException,
IOException
- Description copied from class:
IndexReader
- Implements deletion of the document numbered
docNum
.
Applications should call IndexReader.deleteDocument(int)
or IndexReader.deleteDocuments(Term)
.
- Overrides:
doDelete
in class FilterIndexReader
- Throws:
CorruptIndexException
IOException
hasDeletions
public boolean hasDeletions()
- Description copied from class:
IndexReader
- Returns true if any documents have been deleted
- Overrides:
hasDeletions
in class FilterIndexReader
isDeleted
public boolean isDeleted(int n)
- Description copied from class:
IndexReader
- Returns true if document n has been deleted
- Overrides:
isDeleted
in class FilterIndexReader
termPositions
public TermPositions termPositions()
throws IOException
- Description copied from class:
IndexReader
- Returns an unpositioned
TermPositions
enumerator.
- Overrides:
termPositions
in class FilterIndexReader
- Throws:
IOException
- if there is a low-level IO error
Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.