booleanquery.html
来自「 Lucene是apache软件基金会[4] jakarta项目组的一个子项目」· HTML 代码 · 共 794 行 · 第 1/3 页
HTML
794 行
Expert: Returns the Similarity implementation to be used for this query.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#getUseScorer14()">getUseScorer14</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
Returns a hash code value for this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#isCoordDisabled()">isCoordDisabled</A></B>()</CODE>
<BR>
Returns true iff <A HREF="../../../../org/apache/lucene/search/Similarity.html#coord(int, int)"><CODE>Similarity.coord(int,int)</CODE></A> is disabled in scoring for this query instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#rewrite(org.apache.lucene.index.IndexReader)">rewrite</A></B>(<A HREF="../../../../org/apache/lucene/index/IndexReader.html" title="class in org.apache.lucene.index">IndexReader</A> reader)</CODE>
<BR>
Expert: called to re-write queries into primitive queries.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#setMaxClauseCount(int)">setMaxClauseCount</A></B>(int maxClauseCount)</CODE>
<BR>
Set the maximum number of clauses permitted per BooleanQuery.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#setMinimumNumberShouldMatch(int)">setMinimumNumberShouldMatch</A></B>(int min)</CODE>
<BR>
Specifies a minimum number of the optional BooleanClauses which must be satisifed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#setUseScorer14(boolean)">setUseScorer14</A></B>(boolean use14)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#toString(java.lang.String)">toString</A></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)</CODE>
<BR>
Prints a user-readable version of this query.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_org.apache.lucene.search.Query"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class org.apache.lucene.search.<A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/lucene/search/Query.html#combine(org.apache.lucene.search.Query[])">combine</A>, <A HREF="../../../../org/apache/lucene/search/Query.html#getBoost()">getBoost</A>, <A HREF="../../../../org/apache/lucene/search/Query.html#mergeBooleanQueries(org.apache.lucene.search.Query[])">mergeBooleanQueries</A>, <A HREF="../../../../org/apache/lucene/search/Query.html#setBoost(float)">setBoost</A>, <A HREF="../../../../org/apache/lucene/search/Query.html#toString()">toString</A>, <A HREF="../../../../org/apache/lucene/search/Query.html#weight(org.apache.lucene.search.Searcher)">weight</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<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></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><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#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#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 =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="minNrShouldMatch"><!-- --></A><H3>
minNrShouldMatch</H3>
<PRE>
protected int <B>minNrShouldMatch</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= 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="BooleanQuery()"><!-- --></A><H3>
BooleanQuery</H3>
<PRE>
public <B>BooleanQuery</B>()</PRE>
<DL>
<DD>Constructs an empty boolean query.
<P>
</DL>
<HR>
<A NAME="BooleanQuery(boolean)"><!-- --></A><H3>
BooleanQuery</H3>
<PRE>
public <B>BooleanQuery</B>(boolean disableCoord)</PRE>
<DL>
<DD>Constructs an empty boolean query. <A HREF="../../../../org/apache/lucene/search/Similarity.html#coord(int, int)"><CODE>Similarity.coord(int,int)</CODE></A> may be disabled in scoring, as appropriate. For example, this score factor does not make sense for most automatically generated queries, like <A HREF="../../../../org/apache/lucene/search/WildcardQuery.html" title="class in org.apache.lucene.search"><CODE>WildcardQuery</CODE></A> and <A HREF="../../../../org/apache/lucene/search/FuzzyQuery.html" title="class in org.apache.lucene.search"><CODE>FuzzyQuery</CODE></A>.
<P>
<DT><B>Parameters:</B><DD><CODE>disableCoord</CODE> - disables <A HREF="../../../../org/apache/lucene/search/Similarity.html#coord(int, int)"><CODE>Similarity.coord(int,int)</CODE></A> in scoring.</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="getMaxClauseCount()"><!-- --></A><H3>
getMaxClauseCount</H3>
<PRE>
public static int <B>getMaxClauseCount</B>()</PRE>
<DL>
<DD>Return the maximum number of clauses permitted, 1024 by default. Attempts to add more than the permitted number of clauses cause <A HREF="../../../../org/apache/lucene/search/BooleanQuery.TooManyClauses.html" title="class in org.apache.lucene.search"><CODE>BooleanQuery.TooManyClauses</CODE></A> to be thrown.
<P>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#setMaxClauseCount(int)"><CODE>setMaxClauseCount(int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setMaxClauseCount(int)"><!-- --></A><H3>
setMaxClauseCount</H3>
<PRE>
public static void <B>setMaxClauseCount</B>(int maxClauseCount)</PRE>
<DL>
<DD>Set the maximum number of clauses permitted per BooleanQuery. Default value is 1024. <p>TermQuery clauses are generated from for example prefix queries and fuzzy queries. Each TermQuery needs some buffer space during search, so this parameter indirectly controls the maximum buffer requirements for query search. <p>When this parameter becomes a bottleneck for a Query one can use a Filter. For example instead of a <A HREF="../../../../org/apache/lucene/search/RangeQuery.html" title="class in org.apache.lucene.search"><CODE>RangeQuery</CODE></A> one can use a <A HREF="../../../../org/apache/lucene/search/RangeFilter.html" title="class in org.apache.lucene.search"><CODE>RangeFilter</CODE></A>. <p>Normally the buffers are allocated by the JVM. When using for example <A HREF="../../../../org/apache/lucene/store/MMapDirectory.html" title="class in org.apache.lucene.store"><CODE>MMapDirectory</CODE></A> the buffering is left to the operating system.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isCoordDisabled()"><!-- --></A><H3>
isCoordDisabled</H3>
<PRE>
public boolean <B>isCoordDisabled</B>()</PRE>
<DL>
<DD>Returns true iff <A HREF="../../../../org/apache/lucene/search/Similarity.html#coord(int, int)"><CODE>Similarity.coord(int,int)</CODE></A> is disabled in scoring for this query instance.
<P>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#BooleanQuery(boolean)"><CODE>BooleanQuery(boolean)</CODE></A></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> searcher)</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A></CODE></B></DD>
<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>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/lucene/search/Query.html#getSimilarity(org.apache.lucene.search.Searcher)">getSimilarity</A></CODE> in class <CODE><A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setMinimumNumberShouldMatch(int)"><!-- --></A><H3>
setMinimumNumberShouldMatch</H3>
<PRE>
public void <B>setMinimumNumberShouldMatch</B>(int min)</PRE>
<DL>
<DD>Specifies a minimum number of the optional BooleanClauses which must be satisifed. <p> By default no optional clauses are neccessary for a match (unless there are no required clauses). If this method is used, then the specified numebr of clauses is required. </p> <p> Use of this method is totally independant of specifying that any specific clauses are required (or prohibited). This number will only be compared against the number of matching optional clauses. </p> <p> EXPERT NOTE: Using this method will force the use of BooleanWeight2, regardless of wether setUseScorer14(true) has been called. </p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>min</CODE> - the number of optional clauses that must match<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#setUseScorer14(boolean)"><CODE>setUseScorer14(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getMinimumNumberShouldMatch()"><!-- --></A><H3>
getMinimumNumberShouldMatch</H3>
<PRE>
public int <B>getMinimumNumberShouldMatch</B>()</PRE>
<DL>
<DD>Gets the minimum number of the optional BooleanClauses which must be satisifed.
<P>
<DD><DL>
</DL>
</DD>
</DL>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?