fieldcache.html
来自「 Lucene是apache软件基金会[4] jakarta项目组的一个子项目」· HTML 代码 · 共 564 行 · 第 1/3 页
HTML
564 行
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 floats 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 floats.<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, org.apache.lucene.search.FieldCache.FloatParser)"><!-- --></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> 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> field, <A HREF="../../../../org/apache/lucene/search/FieldCache.FloatParser.html" title="interface in org.apache.lucene.search">FieldCache.FloatParser</A> 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 floats 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 floats.<DD><CODE>parser</CODE> - Computes float 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="getStrings(org.apache.lucene.index.IndexReader, java.lang.String)"><!-- --></A><H3>
getStrings</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>getStrings</B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A> 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> 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 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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - Used to get field values.<DD><CODE>field</CODE> - Which field contains the strings.<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="getStringIndex(org.apache.lucene.index.IndexReader, java.lang.String)"><!-- --></A><H3>
getStringIndex</H3>
<PRE>
public <A HREF="../../../../org/apache/lucene/search/FieldCache.StringIndex.html" title="class in org.apache.lucene.search">FieldCache.StringIndex</A> <B>getStringIndex</B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A> 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> 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 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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - Used to get field values.<DD><CODE>field</CODE> - Which field contains the strings.<DT><B>Returns:</B><DD>Array of terms and index into the array 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="getAuto(org.apache.lucene.index.IndexReader, java.lang.String)"><!-- --></A><H3>
getAuto</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getAuto</B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A> 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> 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 <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. For string values, a StringIndex is returned. After calling this method, there is an entry in the cache for both type <code>AUTO</code> and the actual found type.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - Used to get field values.<DD><CODE>field</CODE> - Which field contains the values.<DT><B>Returns:</B><DD>int[], float[] or StringIndex.<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="getCustom(org.apache.lucene.index.IndexReader, java.lang.String, org.apache.lucene.search.SortComparator)"><!-- --></A><H3>
getCustom</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html" title="class or interface in java.lang">Comparable</A>[] <B>getCustom</B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A> 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> field, <A HREF="../../../../org/apache/lucene/search/SortComparator.html" title="class in org.apache.lucene.search">SortComparator</A> comparator) 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 out of <code>field</code> and calls the given SortComparator to get the sort values. A hit in the cache will happen if <code>reader</code>, <code>field</code>, and <code>comparator</code> are the same (using <code>equals()</code>) as a previous call to this method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - Used to get field values.<DD><CODE>field</CODE> - Which field contains the values.<DD><CODE>comparator</CODE> - Used to convert terms into something to sort by.<DT><B>Returns:</B><DD>Array of sort objects, one 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>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FieldCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../../org/apache/lucene/search/FieldCache.FloatParser.html" title="interface in org.apache.lucene.search"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="FieldCache.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?