public class SolrIndexReader extends FilterIndexReader
FilterIndexReader.FilterTermDocs, FilterIndexReader.FilterTermEnum, FilterIndexReader.FilterTermPositionsIndexReader.ReaderClosedListenerinhasChanges| Constructor and Description |
|---|
SolrIndexReader(IndexReader in,
SolrIndexReader parent,
int base)
Recursively wrap an IndexReader in SolrIndexReader instances.
|
| Modifier and Type | Method and Description |
|---|---|
void |
associateInfo(SolrIndexReader source)
Copies SolrReaderInfo instances from the source to this SolrIndexReader
|
Object |
clone() |
IndexReader |
clone(boolean openReadOnly) |
Directory |
directory() |
int |
docFreq(Term t) |
protected void |
doClose() |
Document |
document(int n,
FieldSelector fieldSelector) |
protected void |
doDelete(int n) |
protected void |
doSetNorm(int d,
String f,
byte b) |
protected void |
doUndeleteAll() |
boolean |
equals(Object o) |
int |
getBase()
returns the docid offset within the parent reader
|
Map |
getCommitUserData() |
Object |
getCoreCacheKey() |
FieldInfos |
getFieldInfos() |
IndexCommit |
getIndexCommit() |
int[] |
getLeafOffsets()
Return the doc id offsets for each leaf reader.
|
SolrIndexReader[] |
getLeafReaders()
return the leaf readers in this reader tree, or an array of size 1 containing "this" if "this" is a leaf
|
SolrIndexReader |
getParent()
returns the parent reader, or null of none
|
SolrIndexReader[] |
getSequentialSubReaders() |
TermFreqVector |
getTermFreqVector(int docNumber,
String field) |
void |
getTermFreqVector(int docNumber,
String field,
TermVectorMapper mapper) |
void |
getTermFreqVector(int docNumber,
TermVectorMapper mapper) |
TermFreqVector[] |
getTermFreqVectors(int docNumber) |
int |
getTermInfosIndexDivisor() |
long |
getUniqueTermCount() |
long |
getVersion() |
IndexReader |
getWrappedReader() |
boolean |
hasDeletions() |
int |
hashCode() |
boolean |
hasNorms(String field) |
boolean |
isCurrent() |
boolean |
isDeleted(int n) |
boolean |
isOptimized() |
int |
maxDoc() |
byte[] |
norms(String f) |
void |
norms(String f,
byte[] bytes,
int offset) |
int |
numDocs() |
static int |
readerIndex(int doc,
int[] offsets)
Given an array of IndexReader offsets, find which contains the given doc
|
SolrIndexReader |
reopen() |
SolrIndexReader |
reopen(boolean openReadOnly) |
IndexReader |
reopen(IndexCommit commit) |
TermDocs |
termDocs() |
TermDocs |
termDocs(Term term) |
TermPositions |
termPositions() |
TermEnum |
terms() |
TermEnum |
terms(Term t) |
String |
toString() |
doCommit, getDeletesCacheKeyacquireWriteLock, addReaderClosedListener, 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, setNorm, setNorm, termPositions, tryIncRef, undeleteAllpublic SolrIndexReader(IndexReader in, SolrIndexReader parent, int base)
in - the reader to wrapparent - the parent, if any (null if none)base - the docid offset in the parent (0 if top level)public SolrIndexReader[] getLeafReaders()
public int[] getLeafOffsets()
public static int readerIndex(int doc,
int[] offsets)
public String toString()
toString in class FilterIndexReaderpublic void associateInfo(SolrIndexReader source)
public IndexReader getWrappedReader()
public SolrIndexReader getParent()
public int getBase()
public Directory directory()
directory in class FilterIndexReaderpublic TermFreqVector[] getTermFreqVectors(int docNumber) throws IOException
getTermFreqVectors in class FilterIndexReaderIOExceptionpublic TermFreqVector getTermFreqVector(int docNumber, String field) throws IOException
getTermFreqVector in class FilterIndexReaderIOExceptionpublic void getTermFreqVector(int docNumber,
String field,
TermVectorMapper mapper)
throws IOException
getTermFreqVector in class FilterIndexReaderIOExceptionpublic void getTermFreqVector(int docNumber,
TermVectorMapper mapper)
throws IOException
getTermFreqVector in class FilterIndexReaderIOExceptionpublic int numDocs()
numDocs in class FilterIndexReaderpublic int maxDoc()
maxDoc in class FilterIndexReaderpublic Document document(int n, FieldSelector fieldSelector) throws CorruptIndexException, IOException
document in class FilterIndexReaderCorruptIndexExceptionIOExceptionpublic boolean isDeleted(int n)
isDeleted in class FilterIndexReaderpublic boolean hasDeletions()
hasDeletions in class FilterIndexReaderprotected void doUndeleteAll()
throws CorruptIndexException,
IOException
doUndeleteAll in class FilterIndexReaderCorruptIndexExceptionIOExceptionpublic boolean hasNorms(String field) throws IOException
hasNorms in class FilterIndexReaderIOExceptionpublic byte[] norms(String f) throws IOException
norms in class FilterIndexReaderIOExceptionpublic void norms(String f, byte[] bytes, int offset) throws IOException
norms in class FilterIndexReaderIOExceptionprotected void doSetNorm(int d,
String f,
byte b)
throws CorruptIndexException,
IOException
doSetNorm in class FilterIndexReaderCorruptIndexExceptionIOExceptionpublic TermEnum terms() throws IOException
terms in class FilterIndexReaderIOExceptionpublic TermEnum terms(Term t) throws IOException
terms in class FilterIndexReaderIOExceptionpublic int docFreq(Term t) throws IOException
docFreq in class FilterIndexReaderIOExceptionpublic TermDocs termDocs() throws IOException
termDocs in class FilterIndexReaderIOExceptionpublic TermDocs termDocs(Term term) throws IOException
termDocs in class FilterIndexReaderIOExceptionpublic TermPositions termPositions() throws IOException
termPositions in class FilterIndexReaderIOExceptionprotected void doDelete(int n)
throws CorruptIndexException,
IOException
doDelete in class FilterIndexReaderCorruptIndexExceptionIOExceptionprotected void doClose()
throws IOException
doClose in class FilterIndexReaderIOExceptionpublic FieldInfos getFieldInfos()
getFieldInfos in class FilterIndexReaderpublic long getVersion()
getVersion in class FilterIndexReaderpublic boolean isCurrent()
throws CorruptIndexException,
IOException
isCurrent in class FilterIndexReaderCorruptIndexExceptionIOExceptionpublic boolean isOptimized()
isOptimized in class FilterIndexReaderpublic SolrIndexReader[] getSequentialSubReaders()
getSequentialSubReaders in class FilterIndexReaderpublic IndexReader reopen(IndexCommit commit) throws CorruptIndexException, IOException
reopen in class IndexReaderCorruptIndexExceptionIOExceptionpublic Object clone()
clone in class IndexReaderpublic IndexReader clone(boolean openReadOnly) throws CorruptIndexException, IOException
clone in class IndexReaderCorruptIndexExceptionIOExceptionpublic Map getCommitUserData()
getCommitUserData in class FilterIndexReaderpublic long getUniqueTermCount()
throws IOException
getUniqueTermCount in class FilterIndexReaderIOExceptionpublic SolrIndexReader reopen(boolean openReadOnly) throws IOException
reopen in class IndexReaderIOExceptionpublic SolrIndexReader reopen() throws CorruptIndexException, IOException
reopen in class IndexReaderCorruptIndexExceptionIOExceptionpublic IndexCommit getIndexCommit() throws IOException
getIndexCommit in class FilterIndexReaderIOExceptionpublic Object getCoreCacheKey()
getCoreCacheKey in class FilterIndexReaderpublic int getTermInfosIndexDivisor()
getTermInfosIndexDivisor in class FilterIndexReader