segmentinfos.html
来自「 Lucene是apache软件基金会[4] jakarta项目组的一个子项目」· HTML 代码 · 共 883 行 · 第 1/4 页
HTML
883 行
<PRE>
public static final int <B>FORMAT</B></PRE>
<DL>
<DD>The file format version, a negative number.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.lucene.index.SegmentInfos.FORMAT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="FORMAT_LOCKLESS"><!-- --></A><H3>
FORMAT_LOCKLESS</H3>
<PRE>
public static final int <B>FORMAT_LOCKLESS</B></PRE>
<DL>
<DD>This format adds details used for lockless commits. It differs slightly from the previous format in that file names are never re-used (write once). Instead, each file is written to the next generation. For example, segments_1, segments_2, etc. This allows us to not use a commit lock. See <a href="http://lucene.apache.org/java/docs/fileformats.html">file formats</a> for details.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.lucene.index.SegmentInfos.FORMAT_LOCKLESS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="FORMAT_SINGLE_NORM_FILE"><!-- --></A><H3>
FORMAT_SINGLE_NORM_FILE</H3>
<PRE>
public static final int <B>FORMAT_SINGLE_NORM_FILE</B></PRE>
<DL>
<DD>This is the current file format written. It adds a "hasSingleNormFile" flag into each segment info. See <a href="http://issues.apache.org/jira/browse/LUCENE-756">LUCENE-756</a> for details.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.lucene.index.SegmentInfos.FORMAT_SINGLE_NORM_FILE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="counter"><!-- --></A><H3>
counter</H3>
<PRE>
public int <B>counter</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SegmentInfos()"><!-- --></A><H3>
SegmentInfos</H3>
<PRE>
public <B>SegmentInfos</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="info(int)"><!-- --></A><H3>
info</H3>
<PRE>
public final org.apache.lucene.index.SegmentInfo <B>info</B>(int i)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCurrentSegmentGeneration(java.lang.String[])"><!-- --></A><H3>
getCurrentSegmentGeneration</H3>
<PRE>
public static long <B>getCurrentSegmentGeneration</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>[] files)</PRE>
<DL>
<DD>Get the generation (N) of the current segments_N file from a list of files.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>files</CODE> - -- array of file names to check</DL>
</DD>
</DL>
<HR>
<A NAME="getCurrentSegmentGeneration(org.apache.lucene.store.Directory)"><!-- --></A><H3>
getCurrentSegmentGeneration</H3>
<PRE>
public static long <B>getCurrentSegmentGeneration</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>Get the generation (N) of the current segments_N file in the directory.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>directory</CODE> - -- directory to search for the latest segments_N file<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="getCurrentSegmentFileName(java.lang.String[])"><!-- --></A><H3>
getCurrentSegmentFileName</H3>
<PRE>
public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getCurrentSegmentFileName</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>[] files) 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>Get the filename of the current segments_N file from a list of files.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>files</CODE> - -- array of file names to check<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="getCurrentSegmentFileName(org.apache.lucene.store.Directory)"><!-- --></A><H3>
getCurrentSegmentFileName</H3>
<PRE>
public static <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getCurrentSegmentFileName</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>Get the filename of the current segments_N file in the directory.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>directory</CODE> - -- directory to search for the latest segments_N file<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="getCurrentSegmentFileName()"><!-- --></A><H3>
getCurrentSegmentFileName</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getCurrentSegmentFileName</B>()</PRE>
<DL>
<DD>Get the segments_N filename in use by this segment infos.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getNextSegmentFileName()"><!-- --></A><H3>
getNextSegmentFileName</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getNextSegmentFileName</B>()</PRE>
<DL>
<DD>Get the next segments_N filename that will be written.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="read(org.apache.lucene.store.Directory, java.lang.String)"><!-- --></A><H3>
read</H3>
<PRE>
public final void <B>read</B>(<A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> directory, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> segmentFileName) 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>Read a particular segmentFileName. Note that this may throw an IOException if a commit is in process.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>directory</CODE> - -- directory containing the segments file<DD><CODE>segmentFileName</CODE> - -- segment file to load<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="read(org.apache.lucene.store.Directory)"><!-- --></A><H3>
read</H3>
<PRE>
public final void <B>read</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>This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.
<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="write(org.apache.lucene.store.Directory)"><!-- --></A><H3>
write</H3>
<PRE>
public final void <B>write</B>(<A HREF="../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> directory)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?