lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r830910 - in /lucene/java/branches/lucene_2_9: contrib/CHANGES.txt src/java/org/apache/lucene/analysis/StopFilter.java
Date Thu, 29 Oct 2009 12:16:25 GMT
Author: uschindler
Date: Thu Oct 29 12:16:24 2009
New Revision: 830910

URL: http://svn.apache.org/viewvc?rev=830910&view=rev
Log:
Move changes entries to 2.9.1 section and LUCENE-2002 default value fix

Modified:
    lucene/java/branches/lucene_2_9/contrib/CHANGES.txt
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/StopFilter.java

Modified: lucene/java/branches/lucene_2_9/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/CHANGES.txt?rev=830910&r1=830909&r2=830910&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_9/contrib/CHANGES.txt Thu Oct 29 12:16:24 2009
@@ -1,18 +1,5 @@
 Lucene contrib change Log
 
-======================= 2.9 Branch (not yet released) ==================
-
-Bug fixes
-
- * LUCENE-1954: InstantiatedIndexWriter: Fixed ClassCastException with
-   NumericField because of incorrect unchecked cast: Document.getFields()
-   returns List<Fieldable>.  (Bernd Fondermann via Uwe Schindler)
-   
- * LUCENE-2014: SmartChineseAnalyzer did not properly clear attributes
-   in WordTokenFilter. If enablePositionIncrements is set for StopFilter,
-   then this could create invalid position increments, causing IndexWriter
-   to crash.  (Robert Muir, Uwe Schindler)
-
 ======================= Release 2.9.1 2009-10-30 =======================
 
 Changes in backwards compatibility policy
@@ -44,6 +31,15 @@
  * LUCENE-2003: Highlighter doesn't respect position increments other than 1 with 
    PhraseQuerys. (Uwe Schindler, Mark Miller)
 
+ * LUCENE-1954: InstantiatedIndexWriter: Fixed ClassCastException with
+   NumericField because of incorrect unchecked cast: Document.getFields()
+   returns List<Fieldable>.  (Bernd Fondermann via Uwe Schindler)
+   
+ * LUCENE-2014: SmartChineseAnalyzer did not properly clear attributes
+   in WordTokenFilter. If enablePositionIncrements is set for StopFilter,
+   then this could create invalid position increments, causing IndexWriter
+   to crash.  (Robert Muir, Uwe Schindler)
+
 ======================= Release 2.9.0 2009-09-23 =======================
 
 Changes in runtime behavior

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/StopFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/StopFilter.java?rev=830910&r1=830909&r2=830910&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/StopFilter.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/StopFilter.java Thu
Oct 29 12:16:24 2009
@@ -247,11 +247,15 @@
    * Returns version-dependent default for
    * enablePositionIncrements.  Analyzers that embed
    * StopFilter use this method when creating the
-   * StopFilter.  Prior to 2.9, this returns false.  On 2.9
-   * or later, it returns true.
+   * StopFilter.  Prior to 2.9, this returns {@link #getEnablePositionIncrementsDefault}.
+   * On 2.9 or later, it returns true.
    */
   public static boolean getEnablePositionIncrementsVersionDefault(Version matchVersion) {
-    return (matchVersion.onOrAfter(Version.LUCENE_29));
+    if (matchVersion.onOrAfter(Version.LUCENE_29)) {
+      return true;
+    } else {
+      return ENABLE_POSITION_INCREMENTS_DEFAULT;
+    }
   }
 
   /**
@@ -260,7 +264,8 @@
    * Note: behavior of a single StopFilter instance can be modified 
    * with {@link #setEnablePositionIncrements(boolean)}.
    * This static method allows control over behavior of classes using StopFilters internally,

-   * for example {@link org.apache.lucene.analysis.standard.StandardAnalyzer StandardAnalyzer}.

+   * for example {@link org.apache.lucene.analysis.standard.StandardAnalyzer StandardAnalyzer}
+   * if used with the no-arg ctor.
    * <p>
    * Default : false.
    * @see #setEnablePositionIncrements(boolean).



Mime
View raw message