public class PruningReader
extends org.apache.lucene.index.FilterIndexReader
TermPruningPolicy, and
optionally it can also remove stored fields of documents according to rules
implemented in a StorePruningPolicy.| Modifier and Type | Field and Description |
|---|---|
protected int |
delTermCount |
protected int |
delVecCount |
protected int |
docCount |
protected int |
prunedVecCount |
protected StorePruningPolicy |
storePolicy |
protected int |
termCount |
protected TermPruningPolicy |
termPolicy |
protected int |
vecCount |
| Constructor and Description |
|---|
PruningReader(org.apache.lucene.index.IndexReader in,
StorePruningPolicy storePolicy,
TermPruningPolicy termPolicy)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.document.Document |
document(int n,
org.apache.lucene.document.FieldSelector fieldSelector)
Applies a
StorePruningPolicy to stored fields of a document. |
org.apache.lucene.index.FieldInfos |
getFieldInfos()
Applies a
StorePruningPolicy to the list of available field infos. |
org.apache.lucene.index.IndexReader[] |
getSequentialSubReaders() |
org.apache.lucene.index.TermFreqVector[] |
getTermFreqVectors(int docNumber)
Applies
TermPruningPolicy to terms inside term vectors. |
org.apache.lucene.index.TermPositions |
termPositions()
Applies
TermPruningPolicy to term positions. |
org.apache.lucene.index.TermEnum |
terms()
Applies
TermPruningPolicy to term enum. |
directory, docFreq, doClose, doCommit, doDelete, doSetNorm, doUndeleteAll, getCommitUserData, getCoreCacheKey, getDeletesCacheKey, getIndexCommit, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermInfosIndexDivisor, getUniqueTermCount, getVersion, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, termDocs, termDocs, terms, toStringacquireWriteLock, addReaderClosedListener, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCurrentVersion, getRefCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAllprotected int docCount
protected int vecCount
protected int termCount
protected int delTermCount
protected int prunedVecCount
protected int delVecCount
protected TermPruningPolicy termPolicy
protected StorePruningPolicy storePolicy
public PruningReader(org.apache.lucene.index.IndexReader in,
StorePruningPolicy storePolicy,
TermPruningPolicy termPolicy)
in - input readerstorePolicy - implementation of StorePruningPolicy - if null
then stored values will be retained as is.termPolicy - implementation of TermPruningPolicy, must not
be null.public org.apache.lucene.index.IndexReader[] getSequentialSubReaders()
getSequentialSubReaders in class org.apache.lucene.index.FilterIndexReaderpublic org.apache.lucene.document.Document document(int n,
org.apache.lucene.document.FieldSelector fieldSelector)
throws org.apache.lucene.index.CorruptIndexException,
IOException
StorePruningPolicy to stored fields of a document.document in class org.apache.lucene.index.FilterIndexReaderorg.apache.lucene.index.CorruptIndexExceptionIOExceptionpublic org.apache.lucene.index.FieldInfos getFieldInfos()
StorePruningPolicy to the list of available field infos.getFieldInfos in class org.apache.lucene.index.FilterIndexReaderpublic org.apache.lucene.index.TermFreqVector[] getTermFreqVectors(int docNumber)
throws IOException
TermPruningPolicy to terms inside term vectors.getTermFreqVectors in class org.apache.lucene.index.FilterIndexReaderIOExceptionpublic org.apache.lucene.index.TermPositions termPositions()
throws IOException
TermPruningPolicy to term positions.termPositions in class org.apache.lucene.index.FilterIndexReaderIOExceptionpublic org.apache.lucene.index.TermEnum terms()
throws IOException
TermPruningPolicy to term enum.terms in class org.apache.lucene.index.FilterIndexReaderIOException