lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r813200 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/search/Similarity.java
Date Thu, 10 Sep 2009 03:02:50 GMT
Author: markrmiller
Date: Thu Sep 10 03:02:50 2009
New Revision: 813200

URL: http://svn.apache.org/viewvc?rev=813200&view=rev
Log:
LUCENE-1896: improve Similarity#queryNorm javadoc

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=813200&r1=813199&r2=813200&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Thu Sep 10 03:02:50 2009
@@ -850,6 +850,9 @@
     
  * LUCENE-1900: Improve Searchable Javadoc.
     (Nadav Har'El, Doron Cohen, Marvin Humphrey, Mark Miller)
+    
+ * LUCENE-1896: Improve Similarity#queryNorm javadocs.
+    (Jiri Kuhn, Mark Miller)
 
 Build
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java?rev=813200&r1=813199&r2=813200&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java Thu Sep 10 03:02:50
2009
@@ -386,11 +386,14 @@
   public abstract float lengthNorm(String fieldName, int numTokens);
 
   /** Computes the normalization value for a query given the sum of the squared
-   * weights of each of the query terms.  This value is then multipled into the
-   * weight of each query term.
-   *
-   * <p>This does not affect ranking, but rather just attempts to make scores
-   * from different queries comparable.
+   * weights of each of the query terms.  This value is multiplied into the
+   * weight of each query term. While the classic query normalization factor is
+   * computed as 1/sqrt(sumOfSquaredWeights), other implementations might
+   * completely ignore sumOfSquaredWeights (ie return 1).
+   *
+   * <p>This does not affect ranking, but the default implementation does make scores
+   * from different queries more comparable than they would be by eliminating the
+   * magnitude of the Query vector as a factor in the score.
    *
    * @param sumOfSquaredWeights the sum of the squares of query term weights
    * @return a normalization factor for query weights



Mime
View raw message