|
||||||||||
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 |
---|
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 | |
---|---|
SolrIndexReader(org.apache.lucene.index.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()
|
org.apache.lucene.index.IndexReader |
clone(boolean openReadOnly)
|
void |
decRef()
|
void |
deleteDocument(int docNum)
|
int |
deleteDocuments(org.apache.lucene.index.Term term)
|
org.apache.lucene.store.Directory |
directory()
|
int |
docFreq(org.apache.lucene.index.Term t)
|
protected void |
doClose()
|
org.apache.lucene.document.Document |
document(int n)
|
org.apache.lucene.document.Document |
document(int n,
org.apache.lucene.document.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()
|
Collection |
getFieldNames(org.apache.lucene.index.IndexReader.FieldOption fieldNames)
|
org.apache.lucene.index.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 |
int |
getRefCount()
|
SolrIndexReader[] |
getSequentialSubReaders()
|
org.apache.lucene.index.TermFreqVector |
getTermFreqVector(int docNumber,
String field)
|
void |
getTermFreqVector(int docNumber,
String field,
org.apache.lucene.index.TermVectorMapper mapper)
|
void |
getTermFreqVector(int docNumber,
org.apache.lucene.index.TermVectorMapper mapper)
|
org.apache.lucene.index.TermFreqVector[] |
getTermFreqVectors(int docNumber)
|
int |
getTermInfosIndexDivisor()
|
long |
getUniqueTermCount()
|
long |
getVersion()
|
org.apache.lucene.index.IndexReader |
getWrappedReader()
|
boolean |
hasDeletions()
|
int |
hashCode()
|
boolean |
hasNorms(String field)
|
void |
incRef()
|
boolean |
isCurrent()
|
boolean |
isDeleted(int n)
|
boolean |
isOptimized()
|
int |
maxDoc()
|
byte[] |
norms(String f)
|
void |
norms(String f,
byte[] bytes,
int offset)
|
int |
numDeletedDocs()
|
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)
|
org.apache.lucene.index.IndexReader |
reopen(org.apache.lucene.index.IndexCommit commit)
|
void |
setNorm(int doc,
String field,
byte value)
|
void |
setNorm(int doc,
String field,
float value)
|
org.apache.lucene.index.TermDocs |
termDocs()
|
org.apache.lucene.index.TermDocs |
termDocs(org.apache.lucene.index.Term term)
|
org.apache.lucene.index.TermPositions |
termPositions()
|
org.apache.lucene.index.TermPositions |
termPositions(org.apache.lucene.index.Term term)
|
org.apache.lucene.index.TermEnum |
terms()
|
org.apache.lucene.index.TermEnum |
terms(org.apache.lucene.index.Term t)
|
String |
toString()
|
void |
undeleteAll()
|
Methods inherited from class org.apache.lucene.index.FilterIndexReader |
---|
addReaderFinishedListener, doCommit, getDeletesCacheKey, removeReaderFinishedListener |
Methods inherited from class org.apache.lucene.index.IndexReader |
---|
acquireWriteLock, close, commit, commit, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCurrentVersion, indexExists, lastModified, listCommits, main, notifyReaderFinishedListeners, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, readerFinished, reopen, tryIncRef |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SolrIndexReader(org.apache.lucene.index.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 org.apache.lucene.index.FilterIndexReader
public void associateInfo(SolrIndexReader source)
public org.apache.lucene.index.IndexReader getWrappedReader()
public SolrIndexReader getParent()
public int getBase()
public org.apache.lucene.store.Directory directory()
directory
in class org.apache.lucene.index.FilterIndexReader
public org.apache.lucene.index.TermFreqVector[] getTermFreqVectors(int docNumber) throws IOException
getTermFreqVectors
in class org.apache.lucene.index.FilterIndexReader
IOException
public org.apache.lucene.index.TermFreqVector getTermFreqVector(int docNumber, String field) throws IOException
getTermFreqVector
in class org.apache.lucene.index.FilterIndexReader
IOException
public void getTermFreqVector(int docNumber, String field, org.apache.lucene.index.TermVectorMapper mapper) throws IOException
getTermFreqVector
in class org.apache.lucene.index.FilterIndexReader
IOException
public void getTermFreqVector(int docNumber, org.apache.lucene.index.TermVectorMapper mapper) throws IOException
getTermFreqVector
in class org.apache.lucene.index.FilterIndexReader
IOException
public int numDocs()
numDocs
in class org.apache.lucene.index.FilterIndexReader
public int maxDoc()
maxDoc
in class org.apache.lucene.index.FilterIndexReader
public org.apache.lucene.document.Document document(int n, org.apache.lucene.document.FieldSelector fieldSelector) throws org.apache.lucene.index.CorruptIndexException, IOException
document
in class org.apache.lucene.index.FilterIndexReader
org.apache.lucene.index.CorruptIndexException
IOException
public boolean isDeleted(int n)
isDeleted
in class org.apache.lucene.index.FilterIndexReader
public boolean hasDeletions()
hasDeletions
in class org.apache.lucene.index.FilterIndexReader
protected void doUndeleteAll() throws org.apache.lucene.index.CorruptIndexException, IOException
doUndeleteAll
in class org.apache.lucene.index.FilterIndexReader
org.apache.lucene.index.CorruptIndexException
IOException
public boolean hasNorms(String field) throws IOException
hasNorms
in class org.apache.lucene.index.FilterIndexReader
IOException
public byte[] norms(String f) throws IOException
norms
in class org.apache.lucene.index.FilterIndexReader
IOException
public void norms(String f, byte[] bytes, int offset) throws IOException
norms
in class org.apache.lucene.index.FilterIndexReader
IOException
protected void doSetNorm(int d, String f, byte b) throws org.apache.lucene.index.CorruptIndexException, IOException
doSetNorm
in class org.apache.lucene.index.FilterIndexReader
org.apache.lucene.index.CorruptIndexException
IOException
public org.apache.lucene.index.TermEnum terms() throws IOException
terms
in class org.apache.lucene.index.FilterIndexReader
IOException
public org.apache.lucene.index.TermEnum terms(org.apache.lucene.index.Term t) throws IOException
terms
in class org.apache.lucene.index.FilterIndexReader
IOException
public int docFreq(org.apache.lucene.index.Term t) throws IOException
docFreq
in class org.apache.lucene.index.FilterIndexReader
IOException
public org.apache.lucene.index.TermDocs termDocs() throws IOException
termDocs
in class org.apache.lucene.index.FilterIndexReader
IOException
public org.apache.lucene.index.TermDocs termDocs(org.apache.lucene.index.Term term) throws IOException
termDocs
in class org.apache.lucene.index.FilterIndexReader
IOException
public org.apache.lucene.index.TermPositions termPositions() throws IOException
termPositions
in class org.apache.lucene.index.FilterIndexReader
IOException
protected void doDelete(int n) throws org.apache.lucene.index.CorruptIndexException, IOException
doDelete
in class org.apache.lucene.index.FilterIndexReader
org.apache.lucene.index.CorruptIndexException
IOException
protected void doClose() throws IOException
doClose
in class org.apache.lucene.index.FilterIndexReader
IOException
public Collection getFieldNames(org.apache.lucene.index.IndexReader.FieldOption fieldNames)
getFieldNames
in class org.apache.lucene.index.FilterIndexReader
public long getVersion()
getVersion
in class org.apache.lucene.index.FilterIndexReader
public boolean isCurrent() throws org.apache.lucene.index.CorruptIndexException, IOException
isCurrent
in class org.apache.lucene.index.FilterIndexReader
org.apache.lucene.index.CorruptIndexException
IOException
public boolean isOptimized()
isOptimized
in class org.apache.lucene.index.FilterIndexReader
public SolrIndexReader[] getSequentialSubReaders()
getSequentialSubReaders
in class org.apache.lucene.index.FilterIndexReader
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public int getRefCount()
getRefCount
in class org.apache.lucene.index.IndexReader
public org.apache.lucene.index.IndexReader reopen(org.apache.lucene.index.IndexCommit commit) throws org.apache.lucene.index.CorruptIndexException, IOException
reopen
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.CorruptIndexException
IOException
public Object clone()
clone
in class org.apache.lucene.index.IndexReader
public org.apache.lucene.index.IndexReader clone(boolean openReadOnly) throws org.apache.lucene.index.CorruptIndexException, IOException
clone
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.CorruptIndexException
IOException
public Map getCommitUserData()
getCommitUserData
in class org.apache.lucene.index.FilterIndexReader
public long getUniqueTermCount() throws IOException
getUniqueTermCount
in class org.apache.lucene.index.IndexReader
IOException
public SolrIndexReader reopen(boolean openReadOnly) throws IOException
reopen
in class org.apache.lucene.index.IndexReader
IOException
public SolrIndexReader reopen() throws org.apache.lucene.index.CorruptIndexException, IOException
reopen
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.CorruptIndexException
IOException
public void decRef() throws IOException
decRef
in class org.apache.lucene.index.IndexReader
IOException
public void deleteDocument(int docNum) throws org.apache.lucene.index.StaleReaderException, org.apache.lucene.index.CorruptIndexException, org.apache.lucene.store.LockObtainFailedException, IOException
deleteDocument
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.StaleReaderException
org.apache.lucene.index.CorruptIndexException
org.apache.lucene.store.LockObtainFailedException
IOException
public int deleteDocuments(org.apache.lucene.index.Term term) throws org.apache.lucene.index.StaleReaderException, org.apache.lucene.index.CorruptIndexException, org.apache.lucene.store.LockObtainFailedException, IOException
deleteDocuments
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.StaleReaderException
org.apache.lucene.index.CorruptIndexException
org.apache.lucene.store.LockObtainFailedException
IOException
public org.apache.lucene.document.Document document(int n) throws org.apache.lucene.index.CorruptIndexException, IOException
document
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.CorruptIndexException
IOException
public org.apache.lucene.index.IndexCommit getIndexCommit() throws IOException
getIndexCommit
in class org.apache.lucene.index.IndexReader
IOException
public void incRef()
incRef
in class org.apache.lucene.index.IndexReader
public int numDeletedDocs()
numDeletedDocs
in class org.apache.lucene.index.IndexReader
public void setNorm(int doc, String field, byte value) throws org.apache.lucene.index.StaleReaderException, org.apache.lucene.index.CorruptIndexException, org.apache.lucene.store.LockObtainFailedException, IOException
setNorm
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.StaleReaderException
org.apache.lucene.index.CorruptIndexException
org.apache.lucene.store.LockObtainFailedException
IOException
public void setNorm(int doc, String field, float value) throws org.apache.lucene.index.StaleReaderException, org.apache.lucene.index.CorruptIndexException, org.apache.lucene.store.LockObtainFailedException, IOException
setNorm
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.StaleReaderException
org.apache.lucene.index.CorruptIndexException
org.apache.lucene.store.LockObtainFailedException
IOException
public org.apache.lucene.index.TermPositions termPositions(org.apache.lucene.index.Term term) throws IOException
termPositions
in class org.apache.lucene.index.IndexReader
IOException
public void undeleteAll() throws org.apache.lucene.index.StaleReaderException, org.apache.lucene.index.CorruptIndexException, org.apache.lucene.store.LockObtainFailedException, IOException
undeleteAll
in class org.apache.lucene.index.IndexReader
org.apache.lucene.index.StaleReaderException
org.apache.lucene.index.CorruptIndexException
org.apache.lucene.store.LockObtainFailedException
IOException
public Object getCoreCacheKey()
getCoreCacheKey
in class org.apache.lucene.index.FilterIndexReader
public int getTermInfosIndexDivisor()
getTermInfosIndexDivisor
in class org.apache.lucene.index.IndexReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |