|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.index.IndexReader
org.apache.lucene.index.FilterIndexReader
org.apache.solr.search.SolrIndexReader
public class SolrIndexReader
Solr wrapper for IndexReader that contains extra context. This is currently experimental, for internal use only, and subject to change.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.lucene.index.FilterIndexReader |
|---|
FilterIndexReader.FilterTermDocs, FilterIndexReader.FilterTermEnum, FilterIndexReader.FilterTermPositions |
| Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader |
|---|
IndexReader.ReaderClosedListener |
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.index.FilterIndexReader |
|---|
in |
| Fields inherited from class org.apache.lucene.index.IndexReader |
|---|
hasChanges |
| Constructor Summary | |
|---|---|
SolrIndexReader(IndexReader in,
SolrIndexReader parent,
int base)
Recursively wrap an IndexReader in SolrIndexReader instances. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.apache.lucene.index.FilterIndexReader |
|---|
doCommit, getDeletesCacheKey |
| Methods inherited from class org.apache.lucene.index.IndexReader |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
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)| Method Detail |
|---|
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 FilterIndexReader
public TermFreqVector[] getTermFreqVectors(int docNumber)
throws IOException
getTermFreqVectors in class FilterIndexReaderIOException
public TermFreqVector getTermFreqVector(int docNumber,
String field)
throws IOException
getTermFreqVector in class FilterIndexReaderIOException
public void getTermFreqVector(int docNumber,
String field,
TermVectorMapper mapper)
throws IOException
getTermFreqVector in class FilterIndexReaderIOException
public void getTermFreqVector(int docNumber,
TermVectorMapper mapper)
throws IOException
getTermFreqVector in class FilterIndexReaderIOExceptionpublic int numDocs()
numDocs in class FilterIndexReaderpublic int maxDoc()
maxDoc in class FilterIndexReader
public Document document(int n,
FieldSelector fieldSelector)
throws CorruptIndexException,
IOException
document in class FilterIndexReaderCorruptIndexException
IOExceptionpublic boolean isDeleted(int n)
isDeleted in class FilterIndexReaderpublic boolean hasDeletions()
hasDeletions in class FilterIndexReader
protected void doUndeleteAll()
throws CorruptIndexException,
IOException
doUndeleteAll in class FilterIndexReaderCorruptIndexException
IOException
public boolean hasNorms(String field)
throws IOException
hasNorms in class FilterIndexReaderIOException
public byte[] norms(String f)
throws IOException
norms in class FilterIndexReaderIOException
public void norms(String f,
byte[] bytes,
int offset)
throws IOException
norms in class FilterIndexReaderIOException
protected void doSetNorm(int d,
String f,
byte b)
throws CorruptIndexException,
IOException
doSetNorm in class FilterIndexReaderCorruptIndexException
IOException
public TermEnum terms()
throws IOException
terms in class FilterIndexReaderIOException
public TermEnum terms(Term t)
throws IOException
terms in class FilterIndexReaderIOException
public int docFreq(Term t)
throws IOException
docFreq in class FilterIndexReaderIOException
public TermDocs termDocs()
throws IOException
termDocs in class FilterIndexReaderIOException
public TermDocs termDocs(Term term)
throws IOException
termDocs in class FilterIndexReaderIOException
public TermPositions termPositions()
throws IOException
termPositions in class FilterIndexReaderIOException
protected void doDelete(int n)
throws CorruptIndexException,
IOException
doDelete in class FilterIndexReaderCorruptIndexException
IOException
protected void doClose()
throws IOException
doClose in class FilterIndexReaderIOExceptionpublic FieldInfos getFieldInfos()
getFieldInfos in class FilterIndexReaderpublic long getVersion()
getVersion in class FilterIndexReader
public boolean isCurrent()
throws CorruptIndexException,
IOException
isCurrent in class FilterIndexReaderCorruptIndexException
IOExceptionpublic boolean isOptimized()
isOptimized in class FilterIndexReaderpublic SolrIndexReader[] getSequentialSubReaders()
getSequentialSubReaders in class FilterIndexReaderpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Object
public IndexReader reopen(IndexCommit commit)
throws CorruptIndexException,
IOException
reopen in class IndexReaderCorruptIndexException
IOExceptionpublic Object clone()
clone in class IndexReader
public IndexReader clone(boolean openReadOnly)
throws CorruptIndexException,
IOException
clone in class IndexReaderCorruptIndexException
IOExceptionpublic Map getCommitUserData()
getCommitUserData in class FilterIndexReader
public long getUniqueTermCount()
throws IOException
getUniqueTermCount in class FilterIndexReaderIOException
public SolrIndexReader reopen(boolean openReadOnly)
throws IOException
reopen in class IndexReaderIOException
public SolrIndexReader reopen()
throws CorruptIndexException,
IOException
reopen in class IndexReaderCorruptIndexException
IOException
public IndexCommit getIndexCommit()
throws IOException
getIndexCommit in class FilterIndexReaderIOExceptionpublic Object getCoreCacheKey()
getCoreCacheKey in class FilterIndexReaderpublic int getTermInfosIndexDivisor()
getTermInfosIndexDivisor in class FilterIndexReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||