fieldcache.html

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

HTML
564
字号
 none is found reads <code>field</code> to see if it contains integers, floats or strings, and then calls one of the other methods in this class to get the values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html" title="class or interface in java.lang">Comparable</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/FieldCache.html#getCustom(org.apache.lucene.index.IndexReader, java.lang.String, org.apache.lucene.search.SortComparator)">getCustom</A></B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,          <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;field,          <A HREF="../../../../org/apache/lucene/search/SortComparator.html" title="class in org.apache.lucene.search">SortComparator</A>&nbsp;comparator)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks the internal cache for an appropriate entry, and if none is found reads the terms out of <code>field</code> and calls the given SortComparator to get the sort values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/FieldCache.html#getFloats(org.apache.lucene.index.IndexReader, java.lang.String)">getFloats</A></B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,          <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;field)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks the internal cache for an appropriate entry, and if none is found, reads the terms in <code>field</code> as floats and returns an array of size <code>reader.maxDoc()</code> of the value each document has in the given field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;float[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/FieldCache.html#getFloats(org.apache.lucene.index.IndexReader, java.lang.String, org.apache.lucene.search.FieldCache.FloatParser)">getFloats</A></B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,          <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;field,          <A HREF="../../../../org/apache/lucene/search/FieldCache.FloatParser.html" title="interface in org.apache.lucene.search">FieldCache.FloatParser</A>&nbsp;parser)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks the internal cache for an appropriate entry, and if none is found, reads the terms in <code>field</code> as floats and returns an array of size <code>reader.maxDoc()</code> of the value each document has in the given field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/FieldCache.html#getInts(org.apache.lucene.index.IndexReader, java.lang.String)">getInts</A></B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,        <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;field)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks the internal cache for an appropriate entry, and if none is found, reads the terms in <code>field</code> as integers and returns an array of size <code>reader.maxDoc()</code> of the value each document has in the given field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/FieldCache.html#getInts(org.apache.lucene.index.IndexReader, java.lang.String, org.apache.lucene.search.FieldCache.IntParser)">getInts</A></B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,        <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;field,        <A HREF="../../../../org/apache/lucene/search/FieldCache.IntParser.html" title="interface in org.apache.lucene.search">FieldCache.IntParser</A>&nbsp;parser)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks the internal cache for an appropriate entry, and if none is found, reads the terms in <code>field</code> as integers and returns an array of size <code>reader.maxDoc()</code> of the value each document has in the given field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/lucene/search/FieldCache.StringIndex.html" title="class in org.apache.lucene.search">FieldCache.StringIndex</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/FieldCache.html#getStringIndex(org.apache.lucene.index.IndexReader, java.lang.String)">getStringIndex</A></B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,               <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;field)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks the internal cache for an appropriate entry, and if none is found reads the term values in <code>field</code> and returns an array of them in natural order, along with an array telling which element in the term array each document uses.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&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><A HREF="../../../../org/apache/lucene/search/FieldCache.html#getStrings(org.apache.lucene.index.IndexReader, java.lang.String)">getStrings</A></B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,           <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;field)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks the internal cache for an appropriate entry, and if none is found, reads the term values in <code>field</code> and returns an array of size <code>reader.maxDoc()</code> containing the value each document has in the given field.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="STRING_INDEX"><!-- --></A><H3>
STRING_INDEX</H3>
<PRE>
public static final int <B>STRING_INDEX</B></PRE>
<DL>
<DD>Indicator for StringIndex values in the cache.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.lucene.search.FieldCache.STRING_INDEX">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="DEFAULT"><!-- --></A><H3>
DEFAULT</H3>
<PRE>
public static final <A HREF="../../../../org/apache/lucene/search/FieldCache.html" title="interface in org.apache.lucene.search">FieldCache</A> <B>DEFAULT</B></PRE>
<DL>
<DD>Expert: The cache used internally by sorting and range query classes.
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ 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="getInts(org.apache.lucene.index.IndexReader, java.lang.String)"><!-- --></A><H3>
getInts</H3>
<PRE>
public int[] <B>getInts</B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,                     <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;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>Checks the internal cache for an appropriate entry, and if none is found, reads the terms in <code>field</code> as integers and returns an array of size <code>reader.maxDoc()</code> of the value each document has in the given field.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - Used to get field values.<DD><CODE>field</CODE> - Which field contains the integers.<DT><B>Returns:</B><DD>The values in the given field for each 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 any error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="getInts(org.apache.lucene.index.IndexReader, java.lang.String, org.apache.lucene.search.FieldCache.IntParser)"><!-- --></A><H3>
getInts</H3>
<PRE>
public int[] <B>getInts</B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,                     <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;field,                     <A HREF="../../../../org/apache/lucene/search/FieldCache.IntParser.html" title="interface in org.apache.lucene.search">FieldCache.IntParser</A>&nbsp;parser)              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>Checks the internal cache for an appropriate entry, and if none is found, reads the terms in <code>field</code> as integers and returns an array of size <code>reader.maxDoc()</code> of the value each document has in the given field.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - Used to get field values.<DD><CODE>field</CODE> - Which field contains the integers.<DD><CODE>parser</CODE> - Computes integer for string values.<DT><B>Returns:</B><DD>The values in the given field for each 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 any error occurs.</DL>
</DD>
</DL>
<HR>

<A NAME="getFloats(org.apache.lucene.index.IndexReader, java.lang.String)"><!-- --></A><H3>
getFloats</H3>
<PRE>
public float[] <B>getFloats</B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader,                         <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;field)

⌨️ 快捷键说明

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