@Deprecated
public class InstantiatedIndexReader
extends org.apache.lucene.index.IndexReader
Consider using InstantiatedIndex as if it was immutable.
| Constructor and Description |
|---|
InstantiatedIndexReader(InstantiatedIndex index)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.store.Directory |
directory()
Deprecated.
|
int |
docFreq(org.apache.lucene.index.Term t)
Deprecated.
|
protected void |
doClose()
Deprecated.
|
protected void |
doCommit(java.util.Map<java.lang.String,java.lang.String> commitUserData)
Deprecated.
|
org.apache.lucene.document.Document |
document(int n,
org.apache.lucene.document.FieldSelector fieldSelector)
Deprecated.
Return the
Document at the nth
position. |
protected void |
doDelete(int docNum)
Deprecated.
|
protected void |
doSetNorm(int doc,
java.lang.String field,
byte value)
Deprecated.
|
protected void |
doUndeleteAll()
Deprecated.
|
org.apache.lucene.index.FieldInfos |
getFieldInfos()
Deprecated.
|
InstantiatedIndex |
getIndex()
Deprecated.
|
org.apache.lucene.index.TermFreqVector |
getTermFreqVector(int docNumber,
java.lang.String field)
Deprecated.
|
void |
getTermFreqVector(int docNumber,
java.lang.String field,
org.apache.lucene.index.TermVectorMapper mapper)
Deprecated.
|
void |
getTermFreqVector(int docNumber,
org.apache.lucene.index.TermVectorMapper mapper)
Deprecated.
|
org.apache.lucene.index.TermFreqVector[] |
getTermFreqVectors(int docNumber)
Deprecated.
|
long |
getVersion()
Deprecated.
An InstantiatedIndexReader is not a snapshot in time, it is completely in
sync with the latest commit to the store!
|
boolean |
hasDeletions()
Deprecated.
|
boolean |
isCurrent()
Deprecated.
An InstantiatedIndexReader is always current!
Check whether this IndexReader is still using the current (i.e., most
recently committed) version of the index.
|
boolean |
isDeleted(int n)
Deprecated.
|
boolean |
isOptimized()
Deprecated.
|
int |
maxDoc()
Deprecated.
|
byte[] |
norms(java.lang.String field)
Deprecated.
never ever touch these values.
|
void |
norms(java.lang.String field,
byte[] bytes,
int offset)
Deprecated.
|
int |
numDocs()
Deprecated.
|
org.apache.lucene.index.TermDocs |
termDocs()
Deprecated.
|
org.apache.lucene.index.TermDocs |
termDocs(org.apache.lucene.index.Term term)
Deprecated.
|
org.apache.lucene.index.TermPositions |
termPositions()
Deprecated.
|
org.apache.lucene.index.TermEnum |
terms()
Deprecated.
|
org.apache.lucene.index.TermEnum |
terms(org.apache.lucene.index.Term t)
Deprecated.
|
acquireWriteLock, addReaderClosedListener, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCoreCacheKey, getCurrentVersion, getDeletesCacheKey, getIndexCommit, getRefCount, getSequentialSubReaders, getTermInfosIndexDivisor, getUniqueTermCount, hasNorms, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, toString, tryIncRef, undeleteAllpublic InstantiatedIndexReader(InstantiatedIndex index)
@Deprecated public boolean isOptimized()
isOptimized in class org.apache.lucene.index.IndexReaderpublic long getVersion()
getVersion in class org.apache.lucene.index.IndexReaderInstantiatedIndex.getVersion() in associated instantiated index.public org.apache.lucene.index.FieldInfos getFieldInfos()
getFieldInfos in class org.apache.lucene.index.IndexReaderpublic org.apache.lucene.store.Directory directory()
directory in class org.apache.lucene.index.IndexReaderpublic boolean isCurrent()
throws java.io.IOException
false, in which case you must open a new IndexReader in
order to see the changes. See the description of the autoCommit flag
which controls when the IndexWriter actually commits changes to the
index.isCurrent in class org.apache.lucene.index.IndexReaderorg.apache.lucene.index.CorruptIndexException - if the index is corruptjava.io.IOException - if there is a low-level IO errorjava.lang.UnsupportedOperationException - unless overridden in subclasspublic InstantiatedIndex getIndex()
public int numDocs()
numDocs in class org.apache.lucene.index.IndexReaderpublic int maxDoc()
maxDoc in class org.apache.lucene.index.IndexReaderpublic boolean hasDeletions()
hasDeletions in class org.apache.lucene.index.IndexReaderpublic boolean isDeleted(int n)
isDeleted in class org.apache.lucene.index.IndexReaderprotected void doDelete(int docNum)
throws java.io.IOException
doDelete in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionprotected void doUndeleteAll()
throws java.io.IOException
doUndeleteAll in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionprotected void doCommit(java.util.Map<java.lang.String,java.lang.String> commitUserData)
throws java.io.IOException
doCommit in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionprotected void doClose()
throws java.io.IOException
doClose in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic org.apache.lucene.document.Document document(int n,
org.apache.lucene.document.FieldSelector fieldSelector)
throws org.apache.lucene.index.CorruptIndexException,
java.io.IOException
Document at the nth
position.
Warning!
The resulting document is the actual stored document instance
and not a deserialized clone as retuned by an IndexReader
over a Directory.
I.e., if you need to touch the document, clone it first!
This can also be seen as a feature for live changes of stored values,
but be careful! Adding a field with an name unknown to the index
or to a field with previously no stored values will make
getFieldInfos()
out of sync, causing problems for instance when merging the
instantiated index to another index.
This implementation ignores the field selector! All stored fields are always returned!
document in class org.apache.lucene.index.IndexReadern - document numberfieldSelector - ignoredDocument at the nth positionorg.apache.lucene.index.CorruptIndexException - if the index is corruptjava.io.IOException - if there is a low-level IO errorFieldable,
FieldSelector,
SetBasedFieldSelector,
LoadFirstFieldSelectorpublic byte[] norms(java.lang.String field)
throws java.io.IOException
norms in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic void norms(java.lang.String field,
byte[] bytes,
int offset)
throws java.io.IOException
norms in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionprotected void doSetNorm(int doc,
java.lang.String field,
byte value)
throws java.io.IOException
doSetNorm in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic int docFreq(org.apache.lucene.index.Term t)
throws java.io.IOException
docFreq in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic org.apache.lucene.index.TermEnum terms()
throws java.io.IOException
terms in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic org.apache.lucene.index.TermEnum terms(org.apache.lucene.index.Term t)
throws java.io.IOException
terms in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic org.apache.lucene.index.TermDocs termDocs()
throws java.io.IOException
termDocs in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic org.apache.lucene.index.TermDocs termDocs(org.apache.lucene.index.Term term)
throws java.io.IOException
termDocs in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic org.apache.lucene.index.TermPositions termPositions()
throws java.io.IOException
termPositions in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic org.apache.lucene.index.TermFreqVector[] getTermFreqVectors(int docNumber)
throws java.io.IOException
getTermFreqVectors in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic org.apache.lucene.index.TermFreqVector getTermFreqVector(int docNumber,
java.lang.String field)
throws java.io.IOException
getTermFreqVector in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic void getTermFreqVector(int docNumber,
java.lang.String field,
org.apache.lucene.index.TermVectorMapper mapper)
throws java.io.IOException
getTermFreqVector in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionpublic void getTermFreqVector(int docNumber,
org.apache.lucene.index.TermVectorMapper mapper)
throws java.io.IOException
getTermFreqVector in class org.apache.lucene.index.IndexReaderjava.io.IOExceptionCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.