sortfield.html
来自「 Lucene是apache软件基金会[4] jakarta项目组的一个子项目」· HTML 代码 · 共 749 行 · 第 1/3 页
HTML
749 行
the type of term value is determined dynamically (<A HREF="../../../../org/apache/lucene/search/SortField.html#AUTO"><CODE>AUTO</CODE></A>).
<P>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - Name of field to sort by, cannot be <code>null</code>.<DD><CODE>reverse</CODE> - True if natural order should be reversed.</DL>
<HR>
<A NAME="SortField(java.lang.String, int)"><!-- --></A><H3>
SortField</H3>
<PRE>
public <B>SortField</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> field, int type)</PRE>
<DL>
<DD>Creates a sort by terms in the given field with the type of term values explicitly given.
<P>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - Name of field to sort by. Can be <code>null</code> if <code>type</code> is SCORE or DOC.<DD><CODE>type</CODE> - Type of values in the terms.</DL>
<HR>
<A NAME="SortField(java.lang.String, int, boolean)"><!-- --></A><H3>
SortField</H3>
<PRE>
public <B>SortField</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> field, int type, boolean reverse)</PRE>
<DL>
<DD>Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given.
<P>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - Name of field to sort by. Can be <code>null</code> if <code>type</code> is SCORE or DOC.<DD><CODE>type</CODE> - Type of values in the terms.<DD><CODE>reverse</CODE> - True if natural order should be reversed.</DL>
<HR>
<A NAME="SortField(java.lang.String, java.util.Locale)"><!-- --></A><H3>
SortField</H3>
<PRE>
public <B>SortField</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> field, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale)</PRE>
<DL>
<DD>Creates a sort by terms in the given field sorted according to the given locale.
<P>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - Name of field to sort by, cannot be <code>null</code>.<DD><CODE>locale</CODE> - Locale of values in the field.</DL>
<HR>
<A NAME="SortField(java.lang.String, java.util.Locale, boolean)"><!-- --></A><H3>
SortField</H3>
<PRE>
public <B>SortField</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> field, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> locale, boolean reverse)</PRE>
<DL>
<DD>Creates a sort, possibly in reverse, by terms in the given field sorted according to the given locale.
<P>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - Name of field to sort by, cannot be <code>null</code>.<DD><CODE>locale</CODE> - Locale of values in the field.</DL>
<HR>
<A NAME="SortField(java.lang.String, org.apache.lucene.search.SortComparatorSource)"><!-- --></A><H3>
SortField</H3>
<PRE>
public <B>SortField</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> field, <A HREF="../../../../org/apache/lucene/search/SortComparatorSource.html" title="interface in org.apache.lucene.search">SortComparatorSource</A> comparator)</PRE>
<DL>
<DD>Creates a sort with a custom comparison function.
<P>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - Name of field to sort by; cannot be <code>null</code>.<DD><CODE>comparator</CODE> - Returns a comparator for sorting hits.</DL>
<HR>
<A NAME="SortField(java.lang.String, org.apache.lucene.search.SortComparatorSource, boolean)"><!-- --></A><H3>
SortField</H3>
<PRE>
public <B>SortField</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> field, <A HREF="../../../../org/apache/lucene/search/SortComparatorSource.html" title="interface in org.apache.lucene.search">SortComparatorSource</A> comparator, boolean reverse)</PRE>
<DL>
<DD>Creates a sort, possibly in reverse, with a custom comparison function.
<P>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - Name of field to sort by; cannot be <code>null</code>.<DD><CODE>comparator</CODE> - Returns a comparator for sorting hits.<DD><CODE>reverse</CODE> - True if natural order should be reversed.</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="getField()"><!-- --></A><H3>
getField</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>getField</B>()</PRE>
<DL>
<DD>Returns the name of the field. Could return <code>null</code> if the sort is by SCORE or DOC.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Name of field, possibly <code>null</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getType()"><!-- --></A><H3>
getType</H3>
<PRE>
public int <B>getType</B>()</PRE>
<DL>
<DD>Returns the type of contents in the field.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>One of the constants SCORE, DOC, AUTO, STRING, INT or FLOAT.</DL>
</DD>
</DL>
<HR>
<A NAME="getLocale()"><!-- --></A><H3>
getLocale</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A> <B>getLocale</B>()</PRE>
<DL>
<DD>Returns the Locale by which term values are interpreted. May return <code>null</code> if no Locale was specified.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Locale, or <code>null</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getReverse()"><!-- --></A><H3>
getReverse</H3>
<PRE>
public boolean <B>getReverse</B>()</PRE>
<DL>
<DD>Returns whether the sort should be reversed.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>True if natural order should be reversed.</DL>
</DD>
</DL>
<HR>
<A NAME="getFactory()"><!-- --></A><H3>
getFactory</H3>
<PRE>
public <A HREF="../../../../org/apache/lucene/search/SortComparatorSource.html" title="interface in org.apache.lucene.search">SortComparatorSource</A> <B>getFactory</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</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>toString</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</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/SortField.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">
<A HREF="../../../../org/apache/lucene/search/SortComparator.html" title="class in org.apache.lucene.search"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/lucene/search/TermQuery.html" title="class 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="SortField.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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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 + -
显示快捷键?