public class SolrIndexReader extends FilterIndexReader
FilterIndexReader.FilterTermDocs, FilterIndexReader.FilterTermEnum, FilterIndexReader.FilterTermPositions
IndexReader.ReaderClosedListener
in
hasChanges
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, getDeletesCacheKey
acquireWriteLock, 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, undeleteAll
public 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 FilterIndexReader
public void associateInfo(SolrIndexReader source)
public IndexReader getWrappedReader()
public SolrIndexReader getParent()
public int getBase()
public Directory directory()
directory
in class FilterIndexReader
public TermFreqVector[] getTermFreqVectors(int docNumber) throws IOException
getTermFreqVectors
in class FilterIndexReader
IOException
public TermFreqVector getTermFreqVector(int docNumber, String field) throws IOException
getTermFreqVector
in class FilterIndexReader
IOException
public void getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) throws IOException
getTermFreqVector
in class FilterIndexReader
IOException
public void getTermFreqVector(int docNumber, TermVectorMapper mapper) throws IOException
getTermFreqVector
in class FilterIndexReader
IOException
public int numDocs()
numDocs
in class FilterIndexReader
public int maxDoc()
maxDoc
in class FilterIndexReader
public Document document(int n, FieldSelector fieldSelector) throws CorruptIndexException, IOException
document
in class FilterIndexReader
CorruptIndexException
IOException
public boolean isDeleted(int n)
isDeleted
in class FilterIndexReader
public boolean hasDeletions()
hasDeletions
in class FilterIndexReader
protected void doUndeleteAll() throws CorruptIndexException, IOException
doUndeleteAll
in class FilterIndexReader
CorruptIndexException
IOException
public boolean hasNorms(String field) throws IOException
hasNorms
in class FilterIndexReader
IOException
public byte[] norms(String f) throws IOException
norms
in class FilterIndexReader
IOException
public void norms(String f, byte[] bytes, int offset) throws IOException
norms
in class FilterIndexReader
IOException
protected void doSetNorm(int d, String f, byte b) throws CorruptIndexException, IOException
doSetNorm
in class FilterIndexReader
CorruptIndexException
IOException
public TermEnum terms() throws IOException
terms
in class FilterIndexReader
IOException
public TermEnum terms(Term t) throws IOException
terms
in class FilterIndexReader
IOException
public int docFreq(Term t) throws IOException
docFreq
in class FilterIndexReader
IOException
public TermDocs termDocs() throws IOException
termDocs
in class FilterIndexReader
IOException
public TermDocs termDocs(Term term) throws IOException
termDocs
in class FilterIndexReader
IOException
public TermPositions termPositions() throws IOException
termPositions
in class FilterIndexReader
IOException
protected void doDelete(int n) throws CorruptIndexException, IOException
doDelete
in class FilterIndexReader
CorruptIndexException
IOException
protected void doClose() throws IOException
doClose
in class FilterIndexReader
IOException
public FieldInfos getFieldInfos()
getFieldInfos
in class FilterIndexReader
public long getVersion()
getVersion
in class FilterIndexReader
public boolean isCurrent() throws CorruptIndexException, IOException
isCurrent
in class FilterIndexReader
CorruptIndexException
IOException
public boolean isOptimized()
isOptimized
in class FilterIndexReader
public SolrIndexReader[] getSequentialSubReaders()
getSequentialSubReaders
in class FilterIndexReader
public IndexReader reopen(IndexCommit commit) throws CorruptIndexException, IOException
reopen
in class IndexReader
CorruptIndexException
IOException
public Object clone()
clone
in class IndexReader
public IndexReader clone(boolean openReadOnly) throws CorruptIndexException, IOException
clone
in class IndexReader
CorruptIndexException
IOException
public Map getCommitUserData()
getCommitUserData
in class FilterIndexReader
public long getUniqueTermCount() throws IOException
getUniqueTermCount
in class FilterIndexReader
IOException
public SolrIndexReader reopen(boolean openReadOnly) throws IOException
reopen
in class IndexReader
IOException
public SolrIndexReader reopen() throws CorruptIndexException, IOException
reopen
in class IndexReader
CorruptIndexException
IOException
public IndexCommit getIndexCommit() throws IOException
getIndexCommit
in class FilterIndexReader
IOException
public Object getCoreCacheKey()
getCoreCacheKey
in class FilterIndexReader
public int getTermInfosIndexDivisor()
getTermInfosIndexDivisor
in class FilterIndexReader