?? indexreader.html
字號:
<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="open(java.io.File)"><!-- --></A><H3>
open</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A> <B>open</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> path) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns an IndexReader reading the index in an FSDirectory in the named path.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="open(org.apache.lucene.store.Directory)"><!-- --></A><H3>
open</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A> <B>open</B>(<A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> directory) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns an IndexReader reading the index in the given Directory.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="directory()"><!-- --></A><H3>
directory</H3>
<PRE>
public <A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> <B>directory</B>()</PRE>
<DL>
<DD>Returns the directory this index resides in.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="lastModified(java.lang.String)"><!-- --></A><H3>
lastModified</H3>
<PRE>
public static long <B>lastModified</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> directory) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns the time the index in the named directory was last modified. Do not use this to check whether the reader is still up-to-date, use <A HREF="../../../../org/apache/lucene/index/IndexReader.html#isCurrent()"><CODE>isCurrent()</CODE></A> instead.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="lastModified(java.io.File)"><!-- --></A><H3>
lastModified</H3>
<PRE>
public static long <B>lastModified</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> fileDirectory) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns the time the index in the named directory was last modified. Do not use this to check whether the reader is still up-to-date, use <A HREF="../../../../org/apache/lucene/index/IndexReader.html#isCurrent()"><CODE>isCurrent()</CODE></A> instead.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="lastModified(org.apache.lucene.store.Directory)"><!-- --></A><H3>
lastModified</H3>
<PRE>
public static long <B>lastModified</B>(<A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> directory2) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Returns the time the index in the named directory was last modified. Do not use this to check whether the reader is still up-to-date, use <A HREF="../../../../org/apache/lucene/index/IndexReader.html#isCurrent()"><CODE>isCurrent()</CODE></A> instead.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getCurrentVersion(java.lang.String)"><!-- --></A><H3>
getCurrentVersion</H3>
<PRE>
public static long <B>getCurrentVersion</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> directory) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Reads version number from segments files. The version number is initialized with a timestamp and then increased by one for each change of the index.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>directory</CODE> - where the index resides.<DT><B>Returns:</B><DD>version number.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if segments file cannot be read</DL>
</DD>
</DL>
<HR>
<A NAME="getCurrentVersion(java.io.File)"><!-- --></A><H3>
getCurrentVersion</H3>
<PRE>
public static long <B>getCurrentVersion</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> directory) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Reads version number from segments files. The version number is initialized with a timestamp and then increased by one for each change of the index.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>directory</CODE> - where the index resides.<DT><B>Returns:</B><DD>version number.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if segments file cannot be read</DL>
</DD>
</DL>
<HR>
<A NAME="getCurrentVersion(org.apache.lucene.store.Directory)"><!-- --></A><H3>
getCurrentVersion</H3>
<PRE>
public static long <B>getCurrentVersion</B>(<A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> directory) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Reads version number from segments files. The version number is initialized with a timestamp and then increased by one for each change of the index.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>directory</CODE> - where the index resides.<DT><B>Returns:</B><DD>version number.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if segments file cannot be read.</DL>
</DD>
</DL>
<HR>
<A NAME="getVersion()"><!-- --></A><H3>
getVersion</H3>
<PRE>
public long <B>getVersion</B>()</PRE>
<DL>
<DD>Version number when this IndexReader was opened.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isCurrent()"><!-- --></A><H3>
isCurrent</H3>
<PRE>
public boolean <B>isCurrent</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Check whether this IndexReader still works on a current version of the index. If this is not the case you will need to re-open the IndexReader to make sure you see the latest changes made to the index.
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="isOptimized()"><!-- --></A><H3>
isOptimized</H3>
<PRE>
public boolean <B>isOptimized</B>()</PRE>
<DL>
<DD>Checks is the index is optimized (if it has a single segment and no deletions)
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the index is optimized; <code>false</code> otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="getTermFreqVectors(int)"><!-- --></A><H3>
getTermFreqVectors</H3>
<PRE>
public abstract <A HREF="../../../../org/apache/lucene/index/TermFreqVector.html" title="interface in org.apache.lucene.index">TermFreqVector</A>[] <B>getTermFreqVectors</B>(int docNumber) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>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 contains terms and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null. The term vectors that are returned my either be of type TermFreqVector or of type TermPositionsVector if positions or offsets have been stored.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>docNumber</CODE> - document for which term frequency vectors are returned<DT><B>Returns:</B><DD>array of term frequency vectors. May be null if no term vectors have been stored for the specified document.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if index cannot be accessed<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/lucene/document/Field.TermVector.html" title="class in org.apache.lucene.document"><CODE>Field.TermVector</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getTermFreqVector(int, java.lang.String)"><!-- --></A><H3>
getTermFreqVector</H3>
<PRE>
public abstract <A HREF="../../../../org/apache/lucene/index/TermFreqVector.html" title="interface in org.apache.lucene.index">TermFreqVector</A> <B>getTermFreqVector</B>(int docNumber, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> field) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Return a term frequency vector for the specified document and field. The returned vector contains terms and frequencies for the terms in
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -