Index: src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
===================================================================
--- src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java (revision 826546)
+++ src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java (working copy)
@@ -36,7 +36,7 @@
*
* - As of 2.9, StopFilter preserves position
* increments by default
- *
- As of 2.9, Tokens incorrectly identified as acronyms
+ *
- As of 2.4, Tokens incorrectly identified as acronyms
* are corrected (see LUCENE-1608
*
*
@@ -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
Index: src/java/org/apache/lucene/util/Version.java
===================================================================
--- src/java/org/apache/lucene/util/Version.java (revision 826546)
+++ src/java/org/apache/lucene/util/Version.java (working copy)
@@ -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);