directory.html

来自「 Lucene是apache软件基金会[4] jakarta项目组的一个子项目」· HTML 代码 · 共 700 行 · 第 1/3 页

HTML
700
字号
<CODE>&nbsp;<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></CODE></FONT></TD>
<TD><CODE><B>IndexWriter.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#getDirectory()">getDirectory</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Directory used by this index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></CODE></FONT></TD>
<TD><CODE><B>IndexReader.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexReader.html#directory()">directory</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the directory this index resides in.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TD COLSPAN=2>Methods in <A HREF="../../../../../org/apache/lucene/index/package-summary.html">org.apache.lucene.index</A> with parameters of type <A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B>SegmentInfos.</B><B><A HREF="../../../../../org/apache/lucene/index/SegmentInfos.html#getCurrentSegmentGeneration(org.apache.lucene.store.Directory)">getCurrentSegmentGeneration</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the generation (N) of the current segments_N file in the directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B>SegmentInfos.</B><B><A HREF="../../../../../org/apache/lucene/index/SegmentInfos.html#getCurrentSegmentFileName(org.apache.lucene.store.Directory)">getCurrentSegmentFileName</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the filename of the current segments_N file in the directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B>SegmentInfos.</B><B><A HREF="../../../../../org/apache/lucene/index/SegmentInfos.html#read(org.apache.lucene.store.Directory, java.lang.String)">read</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;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>&nbsp;segmentFileName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read a particular segmentFileName.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B>SegmentInfos.</B><B><A HREF="../../../../../org/apache/lucene/index/SegmentInfos.html#read(org.apache.lucene.store.Directory)">read</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B>SegmentInfos.</B><B><A HREF="../../../../../org/apache/lucene/index/SegmentInfos.html#write(org.apache.lucene.store.Directory)">write</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B>SegmentInfos.</B><B><A HREF="../../../../../org/apache/lucene/index/SegmentInfos.html#readCurrentVersion(org.apache.lucene.store.Directory)">readCurrentVersion</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Current version number from segments file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B>IndexWriter.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#addIndexes(org.apache.lucene.store.Directory[])">addIndexes</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>[]&nbsp;dirs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Merges all segments from an array of indexes into this index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B>IndexWriter.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#addIndexesNoOptimize(org.apache.lucene.store.Directory[])">addIndexesNoOptimize</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>[]&nbsp;dirs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Merges all segments from an array of indexes into this index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A></CODE></FONT></TD>
<TD><CODE><B>IndexReader.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexReader.html#open(org.apache.lucene.store.Directory)">open</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an IndexReader reading the index in the given Directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B>IndexReader.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexReader.html#lastModified(org.apache.lucene.store.Directory)">lastModified</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time the index in the named directory was last modified.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B>IndexReader.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexReader.html#getCurrentVersion(org.apache.lucene.store.Directory)">getCurrentVersion</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads version number from segments files.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B>IndexReader.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexReader.html#indexExists(org.apache.lucene.store.Directory)">indexExists</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if an index exists at the specified directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B>IndexReader.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexReader.html#isLocked(org.apache.lucene.store.Directory)">isLocked</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> iff the index in the named directory is currently locked.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B>IndexReader.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexReader.html#unlock(org.apache.lucene.store.Directory)">unlock</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Forcibly unlocks the index in the named directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B>IndexModifier.</B><B><A HREF="../../../../../org/apache/lucene/index/IndexModifier.html#init(org.apache.lucene.store.Directory, org.apache.lucene.analysis.Analyzer, boolean)">init</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory,     <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A>&nbsp;analyzer,     boolean&nbsp;create)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize an IndexWriter.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TD COLSPAN=2>Constructors in <A HREF="../../../../../org/apache/lucene/index/package-summary.html">org.apache.lucene.index</A> with parameters of type <A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/FieldNormModifier.html#FieldNormModifier(org.apache.lucene.store.Directory, org.apache.lucene.search.Similarity)">FieldNormModifier</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;d,                  <A HREF="../../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A>&nbsp;s)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for code that wishes to use this class programatically If Similarity is null, kill the field norms.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/SegmentInfos.FindSegmentsFile.html#SegmentInfos.FindSegmentsFile(org.apache.lucene.store.Directory)">SegmentInfos.FindSegmentsFile</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#IndexWriter(org.apache.lucene.store.Directory, org.apache.lucene.analysis.Analyzer, boolean)">IndexWriter</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;d,            <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A>&nbsp;a,            boolean&nbsp;create)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an IndexWriter for the index in <code>d</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexWriter.html#IndexWriter(org.apache.lucene.store.Directory, org.apache.lucene.analysis.Analyzer)">IndexWriter</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;d,            <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A>&nbsp;a)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an IndexWriter for the index in <code>d</code>, creating it first if it does not already exist, otherwise appending to the existing index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexReader.html#IndexReader(org.apache.lucene.store.Directory)">IndexReader</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor used if IndexReader is not owner of its directory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/index/IndexModifier.html#IndexModifier(org.apache.lucene.store.Directory, org.apache.lucene.analysis.Analyzer, boolean)">IndexModifier</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;directory,              <A HREF="../../../../../org/apache/lucene/analysis/Analyzer.html" title="class in org.apache.lucene.analysis">Analyzer</A>&nbsp;analyzer,              boolean&nbsp;create)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open an index with write access.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<A NAME="org.apache.lucene.misc"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
Uses of <A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A> in <A HREF="../../../../../org/apache/lucene/misc/package-summary.html">org.apache.lucene.misc</A></FONT></TD>
</TR>
</TABLE>
&nbsp;
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TD COLSPAN=2>Constructors in <A HREF="../../../../../org/apache/lucene/misc/package-summary.html">org.apache.lucene.misc</A> with parameters of type <A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/lucene/misc/LengthNormModifier.html#LengthNormModifier(org.apache.lucene.store.Directory, org.apache.lucene.search.Similarity)">LengthNormModifier</A></B>(<A HREF="../../../../../org/apache/lucene/store/Directory.html" title="class in org.apache.lucene.store">Directory</A>&nbsp;d,                   <A HREF="../../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A>&nbsp;s)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for code that wishes to use this class progaomatically.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<A NAME="org.apache.lucene.search"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?