lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r827973 - in /lucene/java/branches/lucene_2_9: CHANGES.txt src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java src/java/org/apache/lucene/util/Version.java
Date Wed, 21 Oct 2009 12:03:56 GMT
Author: uschindler
Date: Wed Oct 21 12:03:56 2009
New Revision: 827973

URL: http://svn.apache.org/viewvc?rev=827973&view=rev
Log:
LUCENE-1987: Add support for more versions in StandardAnalyzer to be compatible with coming
Lucene 3.0

Modified:
    lucene/java/branches/lucene_2_9/CHANGES.txt
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
    lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/util/Version.java

Modified: lucene/java/branches/lucene_2_9/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/CHANGES.txt?rev=827973&r1=827972&r2=827973&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_9/CHANGES.txt Wed Oct 21 12:03:56 2009
@@ -34,7 +34,10 @@
  * Un-deprecate o.a.l.util.Version constants.  (Mike McCandless)
 
  * LUCENE-1987: Un-deprecate some ctors of Token, as they will not
-   be removed in 3.0 and are still useful.  (Uwe Schindler)
+   be removed in 3.0 and are still useful. Also add some missing
+   o.a.l.util.Version constants for enabling invalid acronym
+   settings in StandardAnalyzer to be compatible with the coming
+   Lucene 3.0.  (Uwe Schindler)
    
 Documentation
 

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java?rev=827973&r1=827972&r2=827973&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
(original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
Wed Oct 21 12:03:56 2009
@@ -36,7 +36,7 @@
  * <ul>
  *   <li> As of 2.9, StopFilter preserves position
  *        increments by default
- *   <li> As of 2.9, Tokens incorrectly identified as acronyms
+ *   <li> As of 2.4, Tokens incorrectly identified as acronyms
  *        are corrected (see <a href="https://issues.apache.org/jira/browse/LUCENE-1068">LUCENE-1608</a>
  * </ul>
  *
@@ -259,6 +259,11 @@
     } else {
       useDefaultStopPositionIncrements = true;
     }
+    if (matchVersion.onOrAfter(Version.LUCENE_24)) {
+      replaceInvalidAcronym = defaultReplaceInvalidAcronym;
+    } else {
+      replaceInvalidAcronym = false;
+    }
   }
 
   /** Constructs a {@link StandardTokenizer} filtered by a {@link

Modified: lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/util/Version.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/util/Version.java?rev=827973&r1=827972&r2=827973&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/util/Version.java (original)
+++ lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/util/Version.java Wed Oct 21
12:03:56 2009
@@ -37,6 +37,18 @@
    */
   public static final Version LUCENE_CURRENT = new Version("LUCENE_CURRENT", 0);
   
+  /** Match settings and bugs in Lucene's 2.0 release. */
+  public static final Version LUCENE_20 = new Version("LUCENE_20", 2000);
+
+  /** Match settings and bugs in Lucene's 2.1 release. */
+  public static final Version LUCENE_21 = new Version("LUCENE_21", 2100);
+
+  /** Match settings and bugs in Lucene's 2.2 release. */
+  public static final Version LUCENE_22 = new Version("LUCENE_22", 2200);
+
+  /** Match settings and bugs in Lucene's 2.3 release. */
+  public static final Version LUCENE_23 = new Version("LUCENE_23", 2300);
+
   /** Match settings and bugs in Lucene's 2.4 release. */
   public static final Version LUCENE_24 = new Version("LUCENE_24", 2400);
 



Mime
View raw message