lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r917148 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/search/DefaultSimilarity.java
Date Sun, 28 Feb 2010 09:18:25 GMT
Author: rmuir
Date: Sun Feb 28 09:18:18 2010
New Revision: 917148

URL: http://svn.apache.org/viewvc?rev=917148&view=rev
Log:
LUCENE-2286: enable DefaultSimilarity.setDiscountOverlaps by default

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

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=917148&r1=917147&r2=917148&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Sun Feb 28 09:18:18 2010
@@ -22,6 +22,10 @@
 
 * LUCENE-2190: Removed deprecated customScore() and customExplain()
   methods from experimental CustomScoreQuery.  (Uwe Schindler)
+  
+* LUCENE-2286: Enabled DefaultSimilarity.setDiscountOverlaps by default.
+  This means that terms with a position increment gap of zero do not
+  affect the norms calculation by default.  (Robert Muir)
 
 Changes in runtime behavior
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/DefaultSimilarity.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/DefaultSimilarity.java?rev=917148&r1=917147&r2=917148&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/DefaultSimilarity.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/DefaultSimilarity.java Sun Feb 28
09:18:18 2010
@@ -76,13 +76,13 @@
     return overlap / (float)maxOverlap;
   }
 
-  // Default false
-  protected boolean discountOverlaps;
+  // Default true
+  protected boolean discountOverlaps = true;
 
   /** Determines whether overlap tokens (Tokens with
    *  0 position increment) are ignored when computing
-   *  norm.  By default this is false, meaning overlap
-   *  tokens are counted just like non-overlap tokens.
+   *  norm.  By default this is true, meaning overlap
+   *  tokens do not count when computing norms.
    *
    *  @lucene.experimental
    *



Mime
View raw message