|
||||||||||
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.FieldOption |
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)
|
void |
decRef()
|
void |
deleteDocument(int docNum)
|
int |
deleteDocuments(Term term)
|
Directory |
directory()
|
int |
docFreq(Term t)
|
protected void |
doClose()
|
Document |
document(int n)
|
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()
|
boolean |
getDisableFakeNorms()
|
Object |
getFieldCacheKey()
|
Collection |
getFieldNames(IndexReader.FieldOption fieldNames)
|
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()
|
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)
|
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)
|
IndexReader |
reopen(IndexCommit commit)
|
void |
setDisableFakeNorms(boolean disableFakeNorms)
|
void |
setNorm(int doc,
String field,
byte value)
|
void |
setNorm(int doc,
String field,
float value)
|
void |
setTermInfosIndexDivisor(int indexDivisor)
|
TermDocs |
termDocs()
|
TermDocs |
termDocs(Term term)
|
TermPositions |
termPositions()
|
TermPositions |
termPositions(Term term)
|
TermEnum |
terms()
|
TermEnum |
terms(Term t)
|
String |
toString()
|
void |
undeleteAll()
|
Methods inherited from class org.apache.lucene.index.FilterIndexReader |
---|
doCommit, doCommit, getDeletesCacheKey |
Methods inherited from class org.apache.lucene.index.IndexReader |
---|
acquireWriteLock, close, commit, commit, ensureOpen, flush, flush, getCommitUserData, getCurrentVersion, getCurrentVersion, getCurrentVersion, indexExists, indexExists, indexExists, isLocked, isLocked, lastModified, lastModified, lastModified, listCommits, main, open, open, open, open, open, open, open, open, open, open, open, open, open, open, unlock |
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 Object
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 Collection getFieldNames(IndexReader.FieldOption fieldNames)
getFieldNames
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 int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public int getRefCount()
getRefCount
in class IndexReader
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 IndexReader
public long getUniqueTermCount() throws IOException
getUniqueTermCount
in class IndexReader
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 void decRef() throws IOException
decRef
in class IndexReader
IOException
public void deleteDocument(int docNum) throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException
deleteDocument
in class IndexReader
StaleReaderException
CorruptIndexException
LockObtainFailedException
IOException
public int deleteDocuments(Term term) throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException
deleteDocuments
in class IndexReader
StaleReaderException
CorruptIndexException
LockObtainFailedException
IOException
public Document document(int n) throws CorruptIndexException, IOException
document
in class IndexReader
CorruptIndexException
IOException
public IndexCommit getIndexCommit() throws IOException
getIndexCommit
in class IndexReader
IOException
public int getTermInfosIndexDivisor()
getTermInfosIndexDivisor
in class IndexReader
public void incRef()
incRef
in class IndexReader
public int numDeletedDocs()
numDeletedDocs
in class IndexReader
public void setNorm(int doc, String field, byte value) throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException
setNorm
in class IndexReader
StaleReaderException
CorruptIndexException
LockObtainFailedException
IOException
public void setNorm(int doc, String field, float value) throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException
setNorm
in class IndexReader
StaleReaderException
CorruptIndexException
LockObtainFailedException
IOException
public void setTermInfosIndexDivisor(int indexDivisor) throws IllegalStateException
setTermInfosIndexDivisor
in class IndexReader
IllegalStateException
public TermPositions termPositions(Term term) throws IOException
termPositions
in class IndexReader
IOException
public void undeleteAll() throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException
undeleteAll
in class IndexReader
StaleReaderException
CorruptIndexException
LockObtainFailedException
IOException
public Object getFieldCacheKey()
getFieldCacheKey
in class FilterIndexReader
public boolean getDisableFakeNorms()
getDisableFakeNorms
in class IndexReader
public void setDisableFakeNorms(boolean disableFakeNorms)
setDisableFakeNorms
in class IndexReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |