lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1531320 - /lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java
Date Fri, 11 Oct 2013 15:06:31 GMT
Author: mikemccand
Date: Fri Oct 11 15:06:31 2013
New Revision: 1531320

URL: http://svn.apache.org/r1531320
Log:
javadocs; fix compiler warning

Modified:
    lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java

Modified: lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java?rev=1531320&r1=1531319&r2=1531320&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java
(original)
+++ lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/CommonTermsQuery.java
Fri Oct 11 15:06:31 2013
@@ -38,16 +38,16 @@ import org.apache.lucene.util.ToStringUt
 
 /**
  * A query that executes high-frequency terms in a optional sub-query to prevent
- * slow queries due to "common" terms like stopwords. This query basically
- * builds 2 queries off the {@link #add(Term) added} terms where low-frequency
+ * slow queries due to "common" terms like stopwords. This query
+ * builds 2 queries off the {@link #add(Term) added} terms: low-frequency
  * terms are added to a required boolean clause and high-frequency terms are
  * added to an optional boolean clause. The optional clause is only executed if
- * the required "low-frequency' clause matches. Scores produced by this query
- * will be slightly different to plain {@link BooleanQuery} scorer mainly due to
- * differences in the {@link Similarity#coord(int,int) number of leave queries}
- * in the required boolean clause. In the most cases high-frequency terms are
+ * the required "low-frequency" clause matches. Scores produced by this query
+ * will be slightly different than plain {@link BooleanQuery} scorer mainly due to
+ * differences in the {@link Similarity#coord(int,int) number of leaf queries}
+ * in the required boolean clause. In most cases, high-frequency terms are
  * unlikely to significantly contribute to the document score unless at least
- * one of the low-frequency terms are matched such that this query can improve
+ * one of the low-frequency terms are matched.  This query can improve
  * query execution times significantly if applicable.
  * <p>
  * {@link CommonTermsQuery} has several advantages over stopword filtering at
@@ -173,7 +173,7 @@ public class CommonTermsQuery extends Qu
     if (minNrShouldMatch >= 1.0f || minNrShouldMatch == 0.0f) {
       return (int) minNrShouldMatch;
     }
-    return (int) (Math.round(minNrShouldMatch * numOptional));
+    return Math.round(minNrShouldMatch * numOptional);
   }
   
   protected Query buildQuery(final int maxDoc,



Mime
View raw message