query.html

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

HTML
600
字号
setBoost</H3>
<PRE>
public void <B>setBoost</B>(float&nbsp;b)</PRE>
<DL>
<DD>Sets the boost for this query clause to <code>b</code>.  Documents matching this clause will (in addition to the normal weightings) have their score multiplied by <code>b</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getBoost()"><!-- --></A><H3>
getBoost</H3>
<PRE>
public float <B>getBoost</B>()</PRE>
<DL>
<DD>Gets the boost for this clause.  Documents matching this clause will (in addition to the normal weightings) have their score multiplied by <code>b</code>.   The boost is 1.0 by default.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="toString(java.lang.String)"><!-- --></A><H3>
toString</H3>
<PRE>
public abstract <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>(<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)</PRE>
<DL>
<DD>Prints a query to a string, with <code>field</code> assumed to be the  default field and omitted. <p>The representation used is one that is supposed to be readable by <A HREF="../../../../org/apache/lucene/queryParser/QueryParser.html" title="class in org.apache.lucene.queryParser"><CODE>QueryParser</CODE></A>. However, there are the following limitations: <ul>  <li>If the query was created by the parser, the printed  representation may not be exactly what was parsed. For example,  characters that need to be escaped will be represented without  the required backslash.</li> <li>Some of the more complicated queries (e.g. span queries)  don't have a representation that can be parsed by QueryParser.</li> </ul>
<P>
<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>Prints a query to a string.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="createWeight(org.apache.lucene.search.Searcher)"><!-- --></A><H3>
createWeight</H3>
<PRE>
protected <A HREF="../../../../org/apache/lucene/search/Weight.html" title="interface in org.apache.lucene.search">Weight</A> <B>createWeight</B>(<A HREF="../../../../org/apache/lucene/search/Searcher.html" title="class in org.apache.lucene.search">Searcher</A>&nbsp;searcher)                       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: Constructs an appropriate Weight implementation for this query. <p>Only implemented by primitive queries, which re-write to themselves.
<P>
<DD><DL>
</DL>
</DD>
<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="weight(org.apache.lucene.search.Searcher)"><!-- --></A><H3>
weight</H3>
<PRE>
public <A HREF="../../../../org/apache/lucene/search/Weight.html" title="interface in org.apache.lucene.search">Weight</A> <B>weight</B>(<A HREF="../../../../org/apache/lucene/search/Searcher.html" title="class in org.apache.lucene.search">Searcher</A>&nbsp;searcher)              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: Constructs and initializes a Weight for a top-level query.
<P>
<DD><DL>
</DL>
</DD>
<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="rewrite(org.apache.lucene.index.IndexReader)"><!-- --></A><H3>
rewrite</H3>
<PRE>
public <A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A> <B>rewrite</B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A>&nbsp;reader)              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: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
<P>
<DD><DL>
</DL>
</DD>
<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="combine(org.apache.lucene.search.Query[])"><!-- --></A><H3>
combine</H3>
<PRE>
public <A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A> <B>combine</B>(<A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A>[]&nbsp;queries)</PRE>
<DL>
<DD>Expert: called when re-writing queries under MultiSearcher. Create a single query suitable for use by all subsearchers (in 1-1 correspondence with queries). This is an optimization of the OR of all queries. We handle the common optimization cases of equal queries and overlapping clauses of boolean OR queries (as generated by MultiTermQuery.rewrite() and RangeQuery.rewrite()). Be careful overriding this method as queries[0] determines which method will be called and is not necessarily of the same type as the other queries.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="extractTerms(java.util.Set)"><!-- --></A><H3>
extractTerms</H3>
<PRE>
public void <B>extractTerms</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A>&nbsp;terms)</PRE>
<DL>
<DD>Expert: adds all terms occuring in this query to the terms set. Only works if this query is in its <A HREF="../../../../org/apache/lucene/search/Query.html#rewrite(org.apache.lucene.index.IndexReader)"><CODE>rewritten</CODE></A> form.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>UnsupportedOperationException</CODE> - if this query is not yet rewritten</DL>
</DD>
</DL>
<HR>

<A NAME="mergeBooleanQueries(org.apache.lucene.search.Query[])"><!-- --></A><H3>
mergeBooleanQueries</H3>
<PRE>
public static <A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A> <B>mergeBooleanQueries</B>(<A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A>[]&nbsp;queries)</PRE>
<DL>
<DD>Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.<p>A utility for use by <A HREF="../../../../org/apache/lucene/search/Query.html#combine(org.apache.lucene.search.Query[])"><CODE>combine(Query[])</CODE></A> implementations.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getSimilarity(org.apache.lucene.search.Searcher)"><!-- --></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>(<A HREF="../../../../org/apache/lucene/search/Searcher.html" title="class in org.apache.lucene.search">Searcher</A>&nbsp;searcher)</PRE>
<DL>
<DD>Expert: Returns the Similarity implementation to be used for this query. Subclasses may override this method to specify their own Similarity implementation, perhaps one that delegates through that of the Searcher. By default the Searcher's Similarity implementation is returned.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="clone()"><!-- --></A><H3>
clone</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>clone</B>()</PRE>
<DL>
<DD>Returns a clone of this query.
<P>
<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>&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/Query.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/PrefixQuery.html" title="class in org.apache.lucene.search"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/lucene/search/QueryFilter.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="Query.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 + -
显示快捷键?