| java.lang.Object org.apache.lucene.index.IndexReader org.apache.lucene.index.DirectoryIndexReader org.apache.lucene.index.SegmentReader
All known Subclasses: org.apache.lucene.index.GCJSegmentReader,
SegmentReader | class SegmentReader extends DirectoryIndexReader (Code) | | version: $Id: SegmentReader.java 603061 2007-12-10 21:49:41Z gsingers $ |
Method Summary | |
protected void | commitChanges() | static byte[] | createFakeNorms(int size) | protected synchronized void | decRef() | protected void | doClose() | protected void | doDelete(int docNum) | protected synchronized DirectoryIndexReader | doReopen(SegmentInfos infos) | protected void | doSetNorm(int doc, String field, byte value) | protected void | doUndeleteAll() | public int | docFreq(Term t) | public synchronized Document | document(int n, FieldSelector fieldSelector) | FieldInfos | fieldInfos() | Vector | files() | public static SegmentReader | get(SegmentInfo si) | static SegmentReader | get(SegmentInfo si, boolean doOpenStores) | public static SegmentReader | get(SegmentInfo si, int readBufferSize) | static SegmentReader | get(SegmentInfo si, int readBufferSize, boolean doOpenStores) | public static SegmentReader | get(SegmentInfos sis, SegmentInfo si, boolean closeDir) | public static SegmentReader | get(Directory dir, SegmentInfo si, SegmentInfos sis, boolean closeDir, boolean ownDir, int readBufferSize) | public static SegmentReader | get(Directory dir, SegmentInfo si, SegmentInfos sis, boolean closeDir, boolean ownDir, int readBufferSize, boolean doOpenStores) | FieldInfos | getFieldInfos() | public Collection | getFieldNames(IndexReader.FieldOption fieldOption) | FieldsReader | getFieldsReader() | protected synchronized byte[] | getNorms(String field) | SegmentInfo | getSegmentInfo() Return the SegmentInfo of the segment this reader is reading. | String | getSegmentName() Return the name of the segment this reader is reading. | public TermFreqVector | getTermFreqVector(int docNumber, String field) Return a term frequency vector for the specified document and field. | public void | getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) | public void | getTermFreqVector(int docNumber, TermVectorMapper mapper) | public TermFreqVector[] | getTermFreqVectors(int docNumber) Return an array of term frequency vectors for the specified document. | public int | getTermInfosIndexDivisor() | static boolean | hasDeletions(SegmentInfo si) | public boolean | hasDeletions() | public synchronized boolean | hasNorms(String field) | static boolean | hasSeparateNorms(SegmentInfo si) | protected synchronized void | incRef() | public synchronized boolean | isDeleted(int n) | public int | maxDoc() | public synchronized byte[] | norms(String field) | public synchronized void | norms(String field, byte[] bytes, int offset) Read norms into a pre-allocated array. | boolean | normsClosed() | boolean | normsClosed(String field) | public int | numDocs() | synchronized SegmentReader | reopenSegment(SegmentInfo si) | void | rollbackCommit() | void | setSegmentInfo(SegmentInfo info) | public void | setTermInfosIndexDivisor(int indexDivisor) | void | startCommit() | public TermDocs | termDocs() | public TermPositions | termPositions() | public TermEnum | terms() | public TermEnum | terms(Term t) | static boolean | usesCompoundFile(SegmentInfo si) |
createFakeNorms | static byte[] createFakeNorms(int size)(Code) | | |
doDelete | protected void doDelete(int docNum)(Code) | | |
doUndeleteAll | protected void doUndeleteAll()(Code) | | |
fieldInfos | FieldInfos fieldInfos()(Code) | | Returns the field infos of this segment
|
getSegmentInfo | SegmentInfo getSegmentInfo()(Code) | | Return the SegmentInfo of the segment this reader is reading.
|
getSegmentName | String getSegmentName()(Code) | | Return the name of the segment this reader is reading.
|
getTermFreqVector | public TermFreqVector getTermFreqVector(int docNumber, String field) throws IOException(Code) | | Return a term frequency vector for the specified document and field. The
vector returned contains term numbers and frequencies for all terms in
the specified field of this document, if the field had storeTermVector
flag set. If the flag was not set, the method returns null.
throws: IOException - |
getTermFreqVectors | public TermFreqVector[] getTermFreqVectors(int docNumber) throws IOException(Code) | | Return an array of term frequency vectors for the specified document.
The array contains a vector for each vectorized field in the document.
Each vector vector contains term numbers and frequencies for all terms
in a given vectorized field.
If no such fields existed, the method returns null.
throws: IOException - |
getTermInfosIndexDivisor | public int getTermInfosIndexDivisor()(Code) | | |
hasDeletions | public boolean hasDeletions()(Code) | | |
hasNorms | public synchronized boolean hasNorms(String field)(Code) | | |
incRef | protected synchronized void incRef()(Code) | | Increments the RC of this reader, as well as
of all norms this reader is using
|
isDeleted | public synchronized boolean isDeleted(int n)(Code) | | |
maxDoc | public int maxDoc()(Code) | | |
norms | public synchronized void norms(String field, byte[] bytes, int offset) throws IOException(Code) | | Read norms into a pre-allocated array.
|
normsClosed | boolean normsClosed()(Code) | | |
numDocs | public int numDocs()(Code) | | |
rollbackCommit | void rollbackCommit()(Code) | | |
startCommit | void startCommit()(Code) | | |
Methods inherited from org.apache.lucene.index.DirectoryIndexReader | protected void acquireWriteLock() throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException(Code)(Java Doc) abstract protected void commitChanges() throws IOException(Code)(Java Doc) public Directory directory()(Code)(Java Doc) protected void doClose() throws IOException(Code)(Java Doc) protected void doCommit() throws IOException(Code)(Java Doc) abstract protected DirectoryIndexReader doReopen(SegmentInfos infos) throws CorruptIndexException, IOException(Code)(Java Doc) protected void finalize() throws Throwable(Code)(Java Doc) public long getVersion()(Code)(Java Doc) void init(Directory directory, SegmentInfos segmentInfos, boolean closeDirectory)(Code)(Java Doc) public boolean isCurrent() throws CorruptIndexException, IOException(Code)(Java Doc) public boolean isOptimized()(Code)(Java Doc) static DirectoryIndexReader open(Directory directory, boolean closeDirectory, IndexDeletionPolicy deletionPolicy) throws CorruptIndexException, IOException(Code)(Java Doc) final public synchronized IndexReader reopen() throws CorruptIndexException, IOException(Code)(Java Doc) void rollbackCommit()(Code)(Java Doc) public void setDeletionPolicy(IndexDeletionPolicy deletionPolicy)(Code)(Java Doc) void startCommit()(Code)(Java Doc)
|
Fields inherited from org.apache.lucene.index.IndexReader | protected boolean hasChanges(Code)(Java Doc)
|
Methods inherited from org.apache.lucene.index.IndexReader | protected synchronized void acquireWriteLock() throws IOException(Code)(Java Doc) final public synchronized void close() throws IOException(Code)(Java Doc) final protected synchronized void commit() throws IOException(Code)(Java Doc) protected synchronized void decRef() throws IOException(Code)(Java Doc) final public synchronized void deleteDocument(int docNum) throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException(Code)(Java Doc) final public int deleteDocuments(Term term) throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException(Code)(Java Doc) public Directory directory()(Code)(Java Doc) abstract protected void doClose() throws IOException(Code)(Java Doc) abstract protected void doCommit() throws IOException(Code)(Java Doc) abstract protected void doDelete(int docNum) throws CorruptIndexException, IOException(Code)(Java Doc) abstract protected void doSetNorm(int doc, String field, byte value) throws CorruptIndexException, IOException(Code)(Java Doc) abstract protected void doUndeleteAll() throws CorruptIndexException, IOException(Code)(Java Doc) abstract public int docFreq(Term t) throws IOException(Code)(Java Doc) public Document document(int n) throws CorruptIndexException, IOException(Code)(Java Doc) abstract public Document document(int n, FieldSelector fieldSelector) throws CorruptIndexException, IOException(Code)(Java Doc) final protected void ensureOpen() throws AlreadyClosedException(Code)(Java Doc) final public synchronized void flush() throws IOException(Code)(Java Doc) public static long getCurrentVersion(String directory) throws CorruptIndexException, IOException(Code)(Java Doc) public static long getCurrentVersion(File directory) throws CorruptIndexException, IOException(Code)(Java Doc) public static long getCurrentVersion(Directory directory) throws CorruptIndexException, IOException(Code)(Java Doc) abstract public Collection getFieldNames(FieldOption fldOption)(Code)(Java Doc) synchronized int getRefCount()(Code)(Java Doc) abstract public TermFreqVector getTermFreqVector(int docNumber, String field) throws IOException(Code)(Java Doc) abstract public void getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) throws IOException(Code)(Java Doc) abstract public void getTermFreqVector(int docNumber, TermVectorMapper mapper) throws IOException(Code)(Java Doc) abstract public TermFreqVector[] getTermFreqVectors(int docNumber) throws IOException(Code)(Java Doc) public int getTermInfosIndexDivisor()(Code)(Java Doc) public long getVersion()(Code)(Java Doc) abstract public boolean hasDeletions()(Code)(Java Doc) public boolean hasNorms(String field) throws IOException(Code)(Java Doc) protected synchronized void incRef()(Code)(Java Doc) public static boolean indexExists(String directory)(Code)(Java Doc) public static boolean indexExists(File directory)(Code)(Java Doc) public static boolean indexExists(Directory directory) throws IOException(Code)(Java Doc) public boolean isCurrent() throws CorruptIndexException, IOException(Code)(Java Doc) abstract public boolean isDeleted(int n)(Code)(Java Doc) public static boolean isLocked(Directory directory) throws IOException(Code)(Java Doc) public static boolean isLocked(String directory) throws IOException(Code)(Java Doc) public boolean isOptimized()(Code)(Java Doc) public static long lastModified(String directory) throws CorruptIndexException, IOException(Code)(Java Doc) public static long lastModified(File fileDirectory) throws CorruptIndexException, IOException(Code)(Java Doc) public static long lastModified(Directory directory2) throws CorruptIndexException, IOException(Code)(Java Doc) public static void main(String[] args)(Code)(Java Doc) abstract public int maxDoc()(Code)(Java Doc) abstract public byte[] norms(String field) throws IOException(Code)(Java Doc) abstract public void norms(String field, byte[] bytes, int offset) throws IOException(Code)(Java Doc) abstract public int numDocs()(Code)(Java Doc) public static IndexReader open(String path) throws CorruptIndexException, IOException(Code)(Java Doc) public static IndexReader open(File path) throws CorruptIndexException, IOException(Code)(Java Doc) public static IndexReader open(Directory directory) throws CorruptIndexException, IOException(Code)(Java Doc) public static IndexReader open(Directory directory, IndexDeletionPolicy deletionPolicy) throws CorruptIndexException, IOException(Code)(Java Doc) public synchronized IndexReader reopen() throws CorruptIndexException, IOException(Code)(Java Doc) final public synchronized void setNorm(int doc, String field, byte value) throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException(Code)(Java Doc) public void setNorm(int doc, String field, float value) throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException(Code)(Java Doc) public void setTermInfosIndexDivisor(int indexDivisor) throws IllegalStateException(Code)(Java Doc) public TermDocs termDocs(Term term) throws IOException(Code)(Java Doc) abstract public TermDocs termDocs() throws IOException(Code)(Java Doc) public TermPositions termPositions(Term term) throws IOException(Code)(Java Doc) abstract public TermPositions termPositions() throws IOException(Code)(Java Doc) abstract public TermEnum terms() throws IOException(Code)(Java Doc) abstract public TermEnum terms(Term t) throws IOException(Code)(Java Doc) final public synchronized void undeleteAll() throws StaleReaderException, CorruptIndexException, LockObtainFailedException, IOException(Code)(Java Doc) public static void unlock(Directory directory) throws IOException(Code)(Java Doc)
|
|
|