org.apache.lucene.index
Class MultiPassIndexSplitter.FakeDeleteIndexReader

java.lang.Object
  extended by org.apache.lucene.index.IndexReader
      extended by org.apache.lucene.index.FilterIndexReader
          extended by org.apache.lucene.index.MultiPassIndexSplitter.FakeDeleteIndexReader
All Implemented Interfaces:
Closeable, Cloneable
Enclosing class:
MultiPassIndexSplitter

public static class MultiPassIndexSplitter.FakeDeleteIndexReader
extends org.apache.lucene.index.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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.index.FilterIndexReader
org.apache.lucene.index.FilterIndexReader.FilterTermDocs, org.apache.lucene.index.FilterIndexReader.FilterTermEnum, org.apache.lucene.index.FilterIndexReader.FilterTermPositions
 
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
org.apache.lucene.index.IndexReader.FieldOption, org.apache.lucene.index.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(org.apache.lucene.index.IndexReader in)
           
 
Method Summary
protected  void doDelete(int n)
           
protected  void doUndeleteAll()
          Just removes our overlaid deletions - does not undelete the original deletions.
 org.apache.lucene.index.IndexReader[] getSequentialSubReaders()
           
 boolean hasDeletions()
           
 boolean isDeleted(int n)
           
 int numDocs()
           
 org.apache.lucene.index.TermPositions termPositions()
           
 
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

MultiPassIndexSplitter.FakeDeleteIndexReader

public MultiPassIndexSplitter.FakeDeleteIndexReader(org.apache.lucene.index.IndexReader in)
Method Detail

numDocs

public int numDocs()
Overrides:
numDocs in class org.apache.lucene.index.FilterIndexReader

doUndeleteAll

protected void doUndeleteAll()
                      throws org.apache.lucene.index.CorruptIndexException,
                             IOException
Just removes our overlaid deletions - does not undelete the original deletions.

Overrides:
doUndeleteAll in class org.apache.lucene.index.FilterIndexReader
Throws:
org.apache.lucene.index.CorruptIndexException
IOException

doDelete

protected void doDelete(int n)
                 throws org.apache.lucene.index.CorruptIndexException,
                        IOException
Overrides:
doDelete in class org.apache.lucene.index.FilterIndexReader
Throws:
org.apache.lucene.index.CorruptIndexException
IOException

hasDeletions

public boolean hasDeletions()
Overrides:
hasDeletions in class org.apache.lucene.index.FilterIndexReader

isDeleted

public boolean isDeleted(int n)
Overrides:
isDeleted in class org.apache.lucene.index.FilterIndexReader

getSequentialSubReaders

public org.apache.lucene.index.IndexReader[] getSequentialSubReaders()
Overrides:
getSequentialSubReaders in class org.apache.lucene.index.FilterIndexReader

termPositions

public org.apache.lucene.index.TermPositions termPositions()
                                                    throws IOException
Overrides:
termPositions in class org.apache.lucene.index.FilterIndexReader
Throws:
IOException


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.