defaultsimilarity.html
来自「 Lucene是apache软件基金会[4] jakarta项目组的一个子项目」· HTML 代码 · 共 413 行 · 第 1/2 页
HTML
413 行
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= 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="DefaultSimilarity()"><!-- --></A><H3>
DefaultSimilarity</H3>
<PRE>
public <B>DefaultSimilarity</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="lengthNorm(java.lang.String, int)"><!-- --></A><H3>
lengthNorm</H3>
<PRE>
public float <B>lengthNorm</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> fieldName, int numTerms)</PRE>
<DL>
<DD>Implemented as <code>1/sqrt(numTerms)</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html#lengthNorm(java.lang.String, int)">lengthNorm</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fieldName</CODE> - the name of the field<DD><CODE>numTerms</CODE> - the total number of tokens contained in fields named <i>fieldName</i> of <i>doc</i>.<DT><B>Returns:</B><DD>a normalization factor for hits on this field of this document<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/lucene/document/AbstractField.html#setBoost(float)"><CODE>AbstractField.setBoost(float)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="queryNorm(float)"><!-- --></A><H3>
queryNorm</H3>
<PRE>
public float <B>queryNorm</B>(float sumOfSquaredWeights)</PRE>
<DL>
<DD>Implemented as <code>1/sqrt(sumOfSquaredWeights)</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html#queryNorm(float)">queryNorm</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sumOfSquaredWeights</CODE> - the sum of the squares of query term weights<DT><B>Returns:</B><DD>a normalization factor for query weights</DL>
</DD>
</DL>
<HR>
<A NAME="tf(float)"><!-- --></A><H3>
tf</H3>
<PRE>
public float <B>tf</B>(float freq)</PRE>
<DL>
<DD>Implemented as <code>sqrt(freq)</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html#tf(float)">tf</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>freq</CODE> - the frequency of a term within a document<DT><B>Returns:</B><DD>a score factor based on a term's within-document frequency</DL>
</DD>
</DL>
<HR>
<A NAME="sloppyFreq(int)"><!-- --></A><H3>
sloppyFreq</H3>
<PRE>
public float <B>sloppyFreq</B>(int distance)</PRE>
<DL>
<DD>Implemented as <code>1 / (distance + 1)</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html#sloppyFreq(int)">sloppyFreq</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>distance</CODE> - the edit distance of this sloppy phrase match<DT><B>Returns:</B><DD>the frequency increment for this match<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/lucene/search/PhraseQuery.html#setSlop(int)"><CODE>PhraseQuery.setSlop(int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="idf(int, int)"><!-- --></A><H3>
idf</H3>
<PRE>
public float <B>idf</B>(int docFreq, int numDocs)</PRE>
<DL>
<DD>Implemented as <code>log(numDocs/(docFreq+1)) + 1</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html#idf(int, int)">idf</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>docFreq</CODE> - the number of documents which contain the term<DD><CODE>numDocs</CODE> - the total number of documents in the collection<DT><B>Returns:</B><DD>a score factor based on the term's document frequency</DL>
</DD>
</DL>
<HR>
<A NAME="coord(int, int)"><!-- --></A><H3>
coord</H3>
<PRE>
public float <B>coord</B>(int overlap, int maxOverlap)</PRE>
<DL>
<DD>Implemented as <code>overlap / maxOverlap</code>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html#coord(int, int)">coord</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>overlap</CODE> - the number of query terms matched in the document<DD><CODE>maxOverlap</CODE> - the total number of terms in the query<DT><B>Returns:</B><DD>a score factor based on term overlap with the query</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/DefaultSimilarity.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/ConstantScoreRangeQuery.html" title="class in org.apache.lucene.search"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/lucene/search/DisjunctionMaxQuery.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="DefaultSimilarity.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <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 + -
显示快捷键?