scorer.html

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

HTML
462
字号
</TABLE>

<A NAME="Scorer(org.apache.lucene.search.Similarity)"><!-- --></A><H3>
Scorer</H3>
<PRE>
protected <B>Scorer</B>(<A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A>&nbsp;similarity)</PRE>
<DL>
<DD>Constructs a Scorer.
<P>
<DT><B>Parameters:</B><DD><CODE>similarity</CODE> - The <code>Similarity</code> implementation used by this scorer.</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="getSimilarity()"><!-- --></A><H3>
getSimilarity</H3>
<PRE>
public <A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A> <B>getSimilarity</B>()</PRE>
<DL>
<DD>Returns the Similarity implementation used by this scorer.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="score(org.apache.lucene.search.HitCollector)"><!-- --></A><H3>
score</H3>
<PRE>
public void <B>score</B>(<A HREF="../../../../org/apache/lucene/search/HitCollector.html" title="class in org.apache.lucene.search">HitCollector</A>&nbsp;hc)           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>Scores and collects all matching documents.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>hc</CODE> - The collector to which all matching documents are passed through <A HREF="../../../../org/apache/lucene/search/HitCollector.html#collect(int, float)"><CODE>HitCollector.collect(int, float)</CODE></A>. <br>When this method is used the <A HREF="../../../../org/apache/lucene/search/Scorer.html#explain(int)"><CODE>explain(int)</CODE></A> method should not be used.<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></DL>
</DD>
</DL>
<HR>

<A NAME="score(org.apache.lucene.search.HitCollector, int)"><!-- --></A><H3>
score</H3>
<PRE>
protected boolean <B>score</B>(<A HREF="../../../../org/apache/lucene/search/HitCollector.html" title="class in org.apache.lucene.search">HitCollector</A>&nbsp;hc,                        int&nbsp;max)                 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>Expert: Collects matching documents in a range.  Hook for optimization. Note that <A HREF="../../../../org/apache/lucene/search/Scorer.html#next()"><CODE>next()</CODE></A> must be called once before this method is called for the first time.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>hc</CODE> - The collector to which all matching documents are passed through <A HREF="../../../../org/apache/lucene/search/HitCollector.html#collect(int, float)"><CODE>HitCollector.collect(int, float)</CODE></A>.<DD><CODE>max</CODE> - Do not score documents past this.<DT><B>Returns:</B><DD>true if more matching documents may remain.<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></DL>
</DD>
</DL>
<HR>

<A NAME="next()"><!-- --></A><H3>
next</H3>
<PRE>
public abstract boolean <B>next</B>()                      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>Advances to the next document matching the query.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true iff there is another document matching the query. <br>When this method is used the <A HREF="../../../../org/apache/lucene/search/Scorer.html#explain(int)"><CODE>explain(int)</CODE></A> method should not be used.<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></DL>
</DD>
</DL>
<HR>

<A NAME="doc()"><!-- --></A><H3>
doc</H3>
<PRE>
public abstract int <B>doc</B>()</PRE>
<DL>
<DD>Returns the current document number matching the query. Initially invalid, until <A HREF="../../../../org/apache/lucene/search/Scorer.html#next()"><CODE>next()</CODE></A> is called the first time.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="score()"><!-- --></A><H3>
score</H3>
<PRE>
public abstract float <B>score</B>()                     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>Returns the score of the current document matching the query. Initially invalid, until <A HREF="../../../../org/apache/lucene/search/Scorer.html#next()"><CODE>next()</CODE></A> or <A HREF="../../../../org/apache/lucene/search/Scorer.html#skipTo(int)"><CODE>skipTo(int)</CODE></A> is called the first time.
<P>
<DD><DL>
<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></DL>
</DD>
</DL>
<HR>

<A NAME="skipTo(int)"><!-- --></A><H3>
skipTo</H3>
<PRE>
public abstract boolean <B>skipTo</B>(int&nbsp;target)                        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>Skips to the first match beyond the current whose document number is greater than or equal to a given target. <br>When this method is used the <A HREF="../../../../org/apache/lucene/search/Scorer.html#explain(int)"><CODE>explain(int)</CODE></A> method should not be used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - The target document number.<DT><B>Returns:</B><DD>true iff there is such a match. <p>Behaves as if written: <pre>   boolean skipTo(int target) {     do {       if (!next()) 	     return false;     } while (target > doc());     return true;   } </pre>Most implementations are considerably more efficient than that.<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></DL>
</DD>
</DL>
<HR>

<A NAME="explain(int)"><!-- --></A><H3>
explain</H3>
<PRE>
public abstract <A HREF="../../../../org/apache/lucene/search/Explanation.html" title="class in org.apache.lucene.search">Explanation</A> <B>explain</B>(int&nbsp;doc)                             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>Returns an explanation of the score for a document. <br>When this method is used, the <A HREF="../../../../org/apache/lucene/search/Scorer.html#next()"><CODE>next()</CODE></A>, <A HREF="../../../../org/apache/lucene/search/Scorer.html#skipTo(int)"><CODE>skipTo(int)</CODE></A> and <A HREF="../../../../org/apache/lucene/search/Scorer.html#score(org.apache.lucene.search.HitCollector)"><CODE>score(HitCollector)</CODE></A> methods should not be used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>doc</CODE> - The document number for the explanation.<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></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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Scorer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/lucene/search/ScoreDoc.html" title="class in org.apache.lucene.search"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/lucene/search/Searcher.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>  &nbsp;
&nbsp;<A HREF="Scorer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &copy; 2000-2007 Apache Software Foundation.  All Rights Reserved.
</BODY>
</HTML>

⌨️ 快捷键说明

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