Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Remove unnecessary back compatibility

Alan Woodward906f94a8ccdc
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/custom/TestCustomAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/custom/TestCustomAnalyzer.java
index 0a0287a95df..1afb90eb764 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/custom/TestCustomAnalyzer.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/custom/TestCustomAnalyzer.java
@@ -105,7 +105,7 @@ public class TestCustomAnalyzer extends BaseTokenStreamTestCase {
public void testFactoryHtmlStripClassicFolding() throws Exception {
CustomAnalyzer a = CustomAnalyzer.builder()
- .withDefaultMatchVersion(Version.LUCENE_7_0_0)
+ .withDefaultMatchVersion(Version.LUCENE_8_0_0)
.addCharFilter(HTMLStripCharFilterFactory.class)
.withTokenizer(ClassicTokenizerFactory.class)
.addTokenFilter(ASCIIFoldingFilterFactory.class, "preserveOriginal", "true")
@@ -124,7 +124,7 @@ public class TestCustomAnalyzer extends BaseTokenStreamTestCase {
assertSame(LowerCaseFilterFactory.class, tokenFilters.get(1).getClass());
assertEquals(100, a.getPositionIncrementGap("dummy"));
assertEquals(1000, a.getOffsetGap("dummy"));
- assertSame(Version.LUCENE_7_0_0, a.getVersion());
+ assertSame(Version.LUCENE_8_0_0, a.getVersion());
assertAnalyzesTo(a, "<p>foo bar</p> FOO BAR",
new String[] { "foo", "bar", "foo", "bar" },
@@ -137,7 +137,7 @@ public class TestCustomAnalyzer extends BaseTokenStreamTestCase {
public void testHtmlStripClassicFolding() throws Exception {
CustomAnalyzer a = CustomAnalyzer.builder()
- .withDefaultMatchVersion(Version.LUCENE_7_0_0)
+ .withDefaultMatchVersion(Version.LUCENE_8_0_0)
.addCharFilter("htmlstrip")
.withTokenizer("classic")
.addTokenFilter("asciifolding", "preserveOriginal", "true")
@@ -156,7 +156,7 @@ public class TestCustomAnalyzer extends BaseTokenStreamTestCase {
assertSame(LowerCaseFilterFactory.class, tokenFilters.get(1).getClass());
assertEquals(100, a.getPositionIncrementGap("dummy"));
assertEquals(1000, a.getOffsetGap("dummy"));
- assertSame(Version.LUCENE_7_0_0, a.getVersion());
+ assertSame(Version.LUCENE_8_0_0, a.getVersion());
assertAnalyzesTo(a, "<p>foo bar</p> FOO BAR",
new String[] { "foo", "bar", "foo", "bar" },
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index b2ffc1f7c38..d66f17a44a8 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -287,26 +287,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
}
final static String[] oldNames = {
- "7.0.0-cfs",
- "7.0.0-nocfs",
- "7.0.1-cfs",
- "7.0.1-nocfs",
- "7.1.0-cfs",
- "7.1.0-nocfs",
- "7.2.0-cfs",
- "7.2.0-nocfs",
- "7.2.1-cfs",
- "7.2.1-nocfs",
- "7.3.0-cfs",
- "7.3.0-nocfs",
- "7.3.1-cfs",
- "7.3.1-nocfs",
- "7.4.0-cfs",
- "7.4.0-nocfs",
- "7.5.0-cfs",
- "7.5.0-nocfs",
- "7.6.0-cfs",
- "7.6.0-nocfs"
+
};
public static String[] getOldNames() {
@@ -314,16 +295,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
}
final static String[] oldSortedNames = {
- "sorted.7.0.0",
- "sorted.7.0.1",
- "sorted.7.1.0",
- "sorted.7.2.0",
- "sorted.7.2.1",
- "sorted.7.3.0",
- "sorted.7.3.1",
- "sorted.7.4.0",
- "sorted.7.5.0",
- "sorted.7.6.0"
+
};
public static String[] getOldSortedNames() {
@@ -496,7 +468,27 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
"6.6.4-cfs",
"6.6.4-nocfs",
"6.6.5-cfs",
- "6.6.5-nocfs"
+ "6.6.5-nocfs",
+ "7.0.0-cfs",
+ "7.0.0-nocfs",
+ "7.0.1-cfs",
+ "7.0.1-nocfs",
+ "7.1.0-cfs",
+ "7.1.0-nocfs",
+ "7.2.0-cfs",
+ "7.2.0-nocfs",
+ "7.2.1-cfs",
+ "7.2.1-nocfs",
+ "7.3.0-cfs",
+ "7.3.0-nocfs",
+ "7.3.1-cfs",
+ "7.3.1-nocfs",
+ "7.4.0-cfs",
+ "7.4.0-nocfs",
+ "7.5.0-cfs",
+ "7.5.0-nocfs",
+ "7.6.0-cfs",
+ "7.6.0-nocfs"
};
// TODO: on 6.0.0 release, gen the single segment indices and add here:
@@ -1504,9 +1496,10 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
}
}
- public static final String emptyIndex = "empty.7.0.0.zip";
+ public static final String emptyIndex = "empty.8.0.0.zip";
public void testUpgradeEmptyOldIndex() throws Exception {
+ assumeTrue("Reenable when 8.0 is released", false);
Path oldIndexDir = createTempDir("emptyIndex");
TestUtil.unzip(getDataInputStream(emptyIndex), oldIndexDir);
Directory dir = newFSDirectory(oldIndexDir);
@@ -1518,9 +1511,10 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
dir.close();
}
- public static final String moreTermsIndex = "moreterms.7.0.0.zip";
+ public static final String moreTermsIndex = "moreterms.8.0.0.zip";
public void testMoreTerms() throws Exception {
+ assumeTrue("Reenable when 8.0 is released", false);
Path oldIndexDir = createTempDir("moreterms");
TestUtil.unzip(getDataInputStream(moreTermsIndex), oldIndexDir);
Directory dir = newFSDirectory(oldIndexDir);
@@ -1530,7 +1524,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
dir.close();
}
- public static final String dvUpdatesIndex = "dvupdates.7.0.0.zip";
+ public static final String dvUpdatesIndex = "dvupdates.8.0.0.zip";
private void assertNumericDocValues(LeafReader r, String f, String cf) throws IOException {
NumericDocValues ndvf = r.getNumericDocValues(f);
@@ -1565,6 +1559,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
}
public void testDocValuesUpdates() throws Exception {
+ assumeTrue("Reenable when 8.0 is released", false);
Path oldIndexDir = createTempDir("dvupdates");
TestUtil.unzip(getDataInputStream(dvUpdatesIndex), oldIndexDir);
Directory dir = newFSDirectory(oldIndexDir);
@@ -1593,6 +1588,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
}
public void testSoftDeletes() throws Exception {
+ assumeTrue("Reenable when 8.0 is released", false);
Path oldIndexDir = createTempDir("dvupdates");
TestUtil.unzip(getDataInputStream(dvUpdatesIndex), oldIndexDir);
Directory dir = newFSDirectory(oldIndexDir);
@@ -1613,6 +1609,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
}
public void testDocValuesUpdatesWithNewField() throws Exception {
+ assumeTrue("Reenable when 8.0 is released", false);
Path oldIndexDir = createTempDir("dvupdates");
TestUtil.unzip(getDataInputStream(dvUpdatesIndex), oldIndexDir);
Directory dir = newFSDirectory(oldIndexDir);
@@ -1726,8 +1723,9 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
* before https://issues.apache.org/jira/browse/LUCENE-8592.
*/
public void testSortedIndexWithInvalidSort() throws Exception {
+ assumeTrue("Reenable when 8.0 is released", false);
Path path = createTempDir("sorted");
- String name = "sorted-invalid.7.5.0.zip";
+ String name = "sorted-invalid.8.0.0.zip";
InputStream resource = TestBackwardsCompatibility.class.getResourceAsStream(name);
assertNotNull("Sorted index index " + name + " not found", resource);
TestUtil.unzip(resource, path);
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestIndexWriterOnOldIndex.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestIndexWriterOnOldIndex.java
index db33fb3a8f8..31378541e5d 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestIndexWriterOnOldIndex.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestIndexWriterOnOldIndex.java
@@ -29,8 +29,8 @@ import org.apache.lucene.util.Version;
public class TestIndexWriterOnOldIndex extends LuceneTestCase {
public void testOpenModeAndCreatedVersion() throws IOException {
- assumeTrue("Reenable when 7.0 is released", false);
- InputStream resource = getClass().getResourceAsStream("unsupported.index.single-empty-doc.7.0.0.zip");
+ assumeTrue("Reenable when 8.0 is released", false);
+ InputStream resource = getClass().getResourceAsStream("index.single-empty-doc.8.0.0.zip");
assertNotNull(resource);
Path path = createTempDir();
TestUtil.unzip(resource, path);
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.0.0-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.0.0-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.0.0-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.0.0-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.0.0-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.0.0-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.0.0-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.0.0-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.0.1-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.0.1-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.0.1-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.0.1-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.0.1-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.0.1-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.0.1-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.0.1-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.1.0-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.1.0-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.1.0-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.1.0-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.1.0-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.1.0-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.1.0-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.1.0-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.2.0-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.2.0-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.2.0-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.2.0-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.2.0-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.2.0-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.2.0-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.2.0-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.2.1-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.2.1-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.2.1-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.2.1-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.2.1-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.2.1-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.2.1-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.2.1-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.3.0-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.3.0-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.3.0-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.3.0-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.3.0-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.3.0-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.3.0-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.3.0-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.3.1-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.3.1-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.3.1-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.3.1-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.3.1-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.3.1-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.3.1-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.3.1-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.4.0-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.4.0-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.4.0-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.4.0-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.4.0-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.4.0-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.4.0-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.4.0-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.5.0-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.5.0-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.5.0-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.5.0-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.5.0-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.5.0-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.5.0-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.5.0-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.6.0-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.6.0-cfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.6.0-cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.6.0-cfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.6.0-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.6.0-nocfs.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/index.7.6.0-nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.7.6.0-nocfs.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/dvupdates.7.0.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.dvupdates.7.0.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/dvupdates.7.0.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.dvupdates.7.0.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/empty.7.0.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.empty.7.0.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/empty.7.0.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.empty.7.0.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/moreterms.7.0.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.moreterms.7.0.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/moreterms.7.0.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.moreterms.7.0.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted-invalid.7.5.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted-invalid.7.5.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted-invalid.7.5.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted-invalid.7.5.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.0.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.0.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.0.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.0.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.0.1.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.0.1.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.0.1.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.0.1.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.1.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.1.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.1.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.1.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.2.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.2.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.2.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.2.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.2.1.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.2.1.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.2.1.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.2.1.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.3.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.3.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.3.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.3.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.3.1.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.3.1.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.3.1.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.3.1.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.4.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.4.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.4.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.4.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.5.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.5.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.5.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.5.0.zip
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.6.0.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.6.0.zip
similarity index 100%
rename from lucene/backward-codecs/src/test/org/apache/lucene/index/sorted.7.6.0.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.sorted.7.6.0.zip
diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexFormatTooOldException.java b/lucene/core/src/java/org/apache/lucene/index/IndexFormatTooOldException.java
index 1fd79539adb..24951738765 100644
--- a/lucene/core/src/java/org/apache/lucene/index/IndexFormatTooOldException.java
+++ b/lucene/core/src/java/org/apache/lucene/index/IndexFormatTooOldException.java
@@ -42,7 +42,7 @@ public class IndexFormatTooOldException extends IOException {
* @lucene.internal */
public IndexFormatTooOldException(String resourceDescription, String reason) {
super("Format version is not supported (resource " + resourceDescription + "): " +
- reason + ". This version of Lucene only supports indexes created with release 7.0 and later.");
+ reason + ". This version of Lucene only supports indexes created with release 8.0 and later.");
this.resourceDescription = resourceDescription;
this.reason = reason;
this.version = null;
@@ -72,7 +72,7 @@ public class IndexFormatTooOldException extends IOException {
public IndexFormatTooOldException(String resourceDescription, int version, int minVersion, int maxVersion) {
super("Format version is not supported (resource " + resourceDescription + "): " +
version + " (needs to be between " + minVersion + " and " + maxVersion +
- "). This version of Lucene only supports indexes created with release 6.0 and later.");
+ "). This version of Lucene only supports indexes created with release 8.0 and later.");
this.resourceDescription = resourceDescription;
this.version = version;
this.minVersion = minVersion;
diff --git a/lucene/core/src/java/org/apache/lucene/index/LeafMetaData.java b/lucene/core/src/java/org/apache/lucene/index/LeafMetaData.java
index 567d43edf97..70b701dd8d5 100644
--- a/lucene/core/src/java/org/apache/lucene/index/LeafMetaData.java
+++ b/lucene/core/src/java/org/apache/lucene/index/LeafMetaData.java
@@ -38,9 +38,6 @@ public final class LeafMetaData {
if (createdVersionMajor < 6) {
throw new IllegalArgumentException("createdVersionMajor must be >= 6, got: " + createdVersionMajor);
}
- if (minVersion != null && minVersion.onOrAfter(Version.LUCENE_7_0_0) == false) {
- throw new IllegalArgumentException("minVersion must be >= 7.0.0: " + minVersion);
- }
if (createdVersionMajor >= 7 && minVersion == null) {
throw new IllegalArgumentException("minVersion must be set when createdVersionMajor is >= 7");
}
diff --git a/lucene/core/src/java/org/apache/lucene/util/Version.java b/lucene/core/src/java/org/apache/lucene/util/Version.java
index 213c12b7694..8a5628e6965 100644
--- a/lucene/core/src/java/org/apache/lucene/util/Version.java
+++ b/lucene/core/src/java/org/apache/lucene/util/Version.java
@@ -32,84 +32,6 @@ import java.util.Locale;
*/
public final class Version {
- /**
- * Match settings and bugs in Lucene's 7.0.0 release.
- * @deprecated (8.0.0) Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_0_0 = new Version(7, 0, 0);
-
- /**
- * Match settings and bugs in Lucene's 7.0.1 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_0_1 = new Version(7, 0, 1);
-
- /**
- * Match settings and bugs in Lucene's 7.1.0 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_1_0 = new Version(7, 1, 0);
-
- /**
- * Match settings and bugs in Lucene's 7.2.0 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_2_0 = new Version(7, 2, 0);
-
- /**
- * Match settings and bugs in Lucene's 7.2.1 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_2_1 = new Version(7, 2, 1);
-
-
- /**
- * Match settings and bugs in Lucene's 7.3.0 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_3_0 = new Version(7, 3, 0);
-
- /**
- * Match settings and bugs in Lucene's 7.3.1 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_3_1 = new Version(7, 3, 1);
-
- /**
- * Match settings and bugs in Lucene's 7.4.0 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_4_0 = new Version(7, 4, 0);
-
- /**
- * Match settings and bugs in Lucene's 7.5.0 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_5_0 = new Version(7, 5, 0);
-
- /**
- * Match settings and bugs in Lucene's 7.6.0 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_6_0 = new Version(7, 6, 0);
-
- /**
- * Match settings and bugs in Lucene's 7.7.0 release.
- * @deprecated Use latest
- */
- @Deprecated
- public static final Version LUCENE_7_7_0 = new Version(7, 7, 0);
-
/**
* Match settings and bugs in Lucene's 8.0.0 release.
* @deprecated (9.0.0) Use latest
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestSegmentInfos.java b/lucene/core/src/test/org/apache/lucene/index/TestSegmentInfos.java
index 7611d156367..ac218e0a314 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestSegmentInfos.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestSegmentInfos.java
@@ -61,7 +61,7 @@ public class TestSegmentInfos extends LuceneTestCase {
Codec codec = Codec.getDefault();
SegmentInfos sis = new SegmentInfos(Version.LATEST.major);
- SegmentInfo info = new SegmentInfo(dir, Version.LUCENE_8_0_0, Version.LUCENE_8_0_0, "_0", 1, false, Codec.getDefault(),
+ SegmentInfo info = new SegmentInfo(dir, Version.LUCENE_9_0_0, Version.LUCENE_9_0_0, "_0", 1, false, Codec.getDefault(),
Collections.<String,String>emptyMap(), id, Collections.<String,String>emptyMap(), null);
info.setFiles(Collections.<String>emptySet());
codec.segmentInfoFormat().write(dir, info, IOContext.DEFAULT);
@@ -70,7 +70,7 @@ public class TestSegmentInfos extends LuceneTestCase {
sis.add(commitInfo);
sis.commit(dir);
sis = SegmentInfos.readLatestCommit(dir);
- assertEquals(Version.LUCENE_8_0_0, sis.getMinSegmentLuceneVersion());
+ assertEquals(Version.LUCENE_9_0_0, sis.getMinSegmentLuceneVersion());
assertEquals(Version.LATEST, sis.getCommitLuceneVersion());
dir.close();
}
@@ -83,14 +83,14 @@ public class TestSegmentInfos extends LuceneTestCase {
Codec codec = Codec.getDefault();
SegmentInfos sis = new SegmentInfos(Version.LATEST.major);
- SegmentInfo info = new SegmentInfo(dir, Version.LUCENE_8_0_0, Version.LUCENE_8_0_0, "_0", 1, false, Codec.getDefault(),
+ SegmentInfo info = new SegmentInfo(dir, Version.LUCENE_9_0_0, Version.LUCENE_9_0_0, "_0", 1, false, Codec.getDefault(),
Collections.<String,String>emptyMap(), id, Collections.<String,String>emptyMap(), null);
info.setFiles(Collections.<String>emptySet());
codec.segmentInfoFormat().write(dir, info, IOContext.DEFAULT);
SegmentCommitInfo commitInfo = new SegmentCommitInfo(info, 0, 0, -1, -1, -1);
sis.add(commitInfo);
- info = new SegmentInfo(dir, Version.LUCENE_8_0_0, Version.LUCENE_8_0_0, "_1", 1, false, Codec.getDefault(),
+ info = new SegmentInfo(dir, Version.LUCENE_9_0_0, Version.LUCENE_9_0_0, "_1", 1, false, Codec.getDefault(),
Collections.<String,String>emptyMap(), id, Collections.<String,String>emptyMap(), null);
info.setFiles(Collections.<String>emptySet());
codec.segmentInfoFormat().write(dir, info, IOContext.DEFAULT);
@@ -99,7 +99,7 @@ public class TestSegmentInfos extends LuceneTestCase {
sis.commit(dir);
sis = SegmentInfos.readLatestCommit(dir);
- assertEquals(Version.LUCENE_8_0_0, sis.getMinSegmentLuceneVersion());
+ assertEquals(Version.LUCENE_9_0_0, sis.getMinSegmentLuceneVersion());
assertEquals(Version.LATEST, sis.getCommitLuceneVersion());
dir.close();
}
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestVersion.java b/lucene/core/src/test/org/apache/lucene/util/TestVersion.java
index cc30a5d3bf0..e19c6150812 100644
--- a/lucene/core/src/test/org/apache/lucene/util/TestVersion.java
+++ b/lucene/core/src/test/org/apache/lucene/util/TestVersion.java
@@ -32,20 +32,20 @@ public class TestVersion extends LuceneTestCase {
assertTrue("LATEST must be always onOrAfter("+v+")", Version.LATEST.onOrAfter(v));
}
}
- assertTrue(Version.LUCENE_8_0_0.onOrAfter(Version.LUCENE_7_0_0));;
+ assertTrue(Version.LUCENE_9_0_0.onOrAfter(Version.LUCENE_8_0_0));;
}
public void testToString() {
- assertEquals("7.0.0", Version.LUCENE_7_0_0.toString());
assertEquals("8.0.0", Version.LUCENE_8_0_0.toString());
+ assertEquals("9.0.0", Version.LUCENE_9_0_0.toString());
}
public void testParseLeniently() throws Exception {
- assertEquals(Version.LUCENE_7_0_0, Version.parseLeniently("7.0"));
- assertEquals(Version.LUCENE_7_0_0, Version.parseLeniently("7.0.0"));
- assertEquals(Version.LUCENE_7_0_0, Version.parseLeniently("LUCENE_70"));
- assertEquals(Version.LUCENE_7_0_0, Version.parseLeniently("LUCENE_7_0"));
- assertEquals(Version.LUCENE_7_0_0, Version.parseLeniently("LUCENE_7_0_0"));
+ assertEquals(Version.LUCENE_9_0_0, Version.parseLeniently("9.0"));
+ assertEquals(Version.LUCENE_9_0_0, Version.parseLeniently("9.0.0"));
+ assertEquals(Version.LUCENE_9_0_0, Version.parseLeniently("LUCENE_90"));
+ assertEquals(Version.LUCENE_9_0_0, Version.parseLeniently("LUCENE_9_0"));
+ assertEquals(Version.LUCENE_9_0_0, Version.parseLeniently("LUCENE_9_0_0"));
assertEquals(Version.LUCENE_8_0_0, Version.parseLeniently("8.0"));
assertEquals(Version.LUCENE_8_0_0, Version.parseLeniently("8.0.0"));
assertEquals(Version.LUCENE_8_0_0, Version.parseLeniently("LUCENE_80"));
@@ -95,7 +95,7 @@ public class TestVersion extends LuceneTestCase {
}
public void testParse() throws Exception {
- assertEquals(Version.LUCENE_7_0_0, Version.parse("7.0.0"));
+ assertEquals(Version.LUCENE_9_0_0, Version.parse("9.0.0"));
assertEquals(Version.LUCENE_8_0_0, Version.parse("8.0.0"));
// Version does not pass judgement on the major version:
@@ -104,7 +104,7 @@ public class TestVersion extends LuceneTestCase {
}
public void testForwardsCompatibility() throws Exception {
- assertTrue(Version.parse("7.10.20").onOrAfter(Version.LUCENE_7_0_0));
+ assertTrue(Version.parse("8.10.20").onOrAfter(Version.LUCENE_8_0_0));
}
public void testParseExceptions() {
diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
index 0b5f35b1dd6..a07ec461dfc 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
@@ -315,7 +315,7 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable {
"requestDispatcher/requestParsers/@enableStreamBody", false);
handleSelect = getBool(
- "requestDispatcher/@handleSelect", !luceneMatchVersion.onOrAfter(Version.LUCENE_7_0_0));
+ "requestDispatcher/@handleSelect", false);
addHttpRequestToContext = getBool(
"requestDispatcher/requestParsers/@addHttpRequestToContext", false);
diff --git a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
index d4db8c977f4..82a82313ac5 100644
--- a/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/ReplicationHandler.java
@@ -69,7 +69,6 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.RateLimiter;
-import org.apache.lucene.util.Version;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.common.params.CommonParams;
@@ -110,7 +109,6 @@ import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import static org.apache.solr.common.params.CommonParams.NAME;
-import static org.apache.solr.core.XmlConfigFile.assertWarnOrFail;
/**
* <p> A Handler which provides a REST API for replication and serves replication requests from Slaves. </p>
@@ -1319,11 +1317,6 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
if (reserve != null && !reserve.trim().equals("")) {
reserveCommitDuration = readIntervalMs(reserve);
deprecatedReserveCommitDuration = reserveCommitDuration;
- // remove this error check & backcompat logic when Version.LUCENE_7_1_0 is removed
- assertWarnOrFail(
- "Beginning with Solr 7.1, master."+RESERVE + " is deprecated and should now be configured directly on the ReplicationHandler.",
- (null == reserve),
- core.getSolrConfig().luceneMatchVersion.onOrAfter(Version.LUCENE_7_1_0));
}
isMaster = true;
}
diff --git a/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java b/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
index 0068c9aaa0f..a97bae590c9 100644
--- a/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
+++ b/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
@@ -44,7 +44,6 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.RegexpQuery;
import org.apache.lucene.search.WildcardQuery;
import org.apache.lucene.util.QueryBuilder;
-import org.apache.lucene.util.Version;
import org.apache.lucene.util.automaton.Automata;
import org.apache.lucene.util.automaton.Automaton;
import org.apache.lucene.util.automaton.Operations;
@@ -228,9 +227,11 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
this.defaultField = defaultField;
setAnalyzer(schema.getQueryAnalyzer());
// TODO in 8.0(?) remove this. Prior to 7.2 we defaulted to allowing sub-query parsing by default
+ /*
if (!parser.getReq().getCore().getSolrConfig().luceneMatchVersion.onOrAfter(Version.LUCENE_7_2_0)) {
setAllowSubQueryParsing(true);
} // otherwise defaults to false
+ */
}
// Turn on the "filter" bit and return the previous flags for the caller to save
diff --git a/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java b/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java
index 25b54083a97..158d5695c04 100644
--- a/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java
+++ b/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java
@@ -364,10 +364,10 @@ public final class FieldTypePluginLoader
Version version = (configuredVersion != null) ?
SolrConfig.parseLuceneVersionString(configuredVersion) : schema.getDefaultLuceneMatchVersion();
- if (!version.onOrAfter(Version.LUCENE_7_0_0)) {
+ if (!version.onOrAfter(Version.LUCENE_8_0_0)) {
log.warn(pluginClassName + " is using deprecated " + version +
- " emulation. You should at some point declare and reindex to at least 7.0, because " +
- "6.x emulation is deprecated and will be removed in 8.0");
+ " emulation. You should at some point declare and reindex to at least 8.0, because " +
+ "7.x emulation is deprecated and will be removed in 9.0");
}
return version;
}
diff --git a/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java b/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java
index d23412173c0..95d723e57b6 100644
--- a/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java
+++ b/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java
@@ -47,7 +47,6 @@ import org.apache.lucene.search.MultiPhraseQuery;
import org.apache.lucene.search.PhraseQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.spans.SpanQuery;
-import org.apache.lucene.util.Version;
import org.apache.solr.analysis.TokenizerChain;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.DisMaxParams;
@@ -1519,7 +1518,7 @@ public class ExtendedDismaxQParser extends QParser {
private DynamicField[] dynamicUserFields;
private DynamicField[] negativeDynamicUserFields;
- UserFields(Map<String, Float> ufm, boolean forbidSubQueryByDefault) {
+ UserFields(Map<String, Float> ufm) {
userFieldsMap = ufm;
if (0 == userFieldsMap.size()) {
userFieldsMap.put("*", null);
@@ -1537,7 +1536,7 @@ public class ExtendedDismaxQParser extends QParser {
}
}
// unless "_query_" was expressly allowed, we forbid it.
- if (forbidSubQueryByDefault && !userFieldsMap.containsKey(MagicFieldName.QUERY.field)) {
+ if (!userFieldsMap.containsKey(MagicFieldName.QUERY.field)) {
userFieldsMap.put("-" + MagicFieldName.QUERY.field, null);
}
Collections.sort(dynUserFields);
@@ -1691,8 +1690,7 @@ public class ExtendedDismaxQParser extends QParser {
solrParams = SolrParams.wrapDefaults(localParams, params);
schema = req.getSchema();
minShouldMatch = DisMaxQParser.parseMinShouldMatch(schema, solrParams); // req.getSearcher() here causes searcher refcount imbalance
- final boolean forbidSubQueryByDefault = req.getCore().getSolrConfig().luceneMatchVersion.onOrAfter(Version.LUCENE_7_2_0);
- userFields = new UserFields(U.parseFieldBoosts(solrParams.getParams(DMP.UF)), forbidSubQueryByDefault);
+ userFields = new UserFields(U.parseFieldBoosts(solrParams.getParams(DMP.UF)));
try {
queryFields = DisMaxQParser.parseQueryFields(schema, solrParams); // req.getSearcher() here causes searcher refcount imbalance
} catch (SyntaxError e) {
@@ -1723,9 +1721,7 @@ public class ExtendedDismaxQParser extends QParser {
altQ = solrParams.get( DisMaxParams.ALTQ );
- // lowercaseOperators defaults to true for luceneMatchVersion < 7.0 and to false for >= 7.0
- lowercaseOperators = solrParams.getBool(DMP.LOWERCASE_OPS,
- !req.getCore().getSolrConfig().luceneMatchVersion.onOrAfter(Version.LUCENE_7_0_0));
+ lowercaseOperators = solrParams.getBool(DMP.LOWERCASE_OPS, false);
/* * * Boosting Query * * */
boostParams = solrParams.getParams(DisMaxParams.BQ);
diff --git a/solr/core/src/test/org/apache/solr/search/similarities/TestNonDefinedSimilarityFactory.java b/solr/core/src/test/org/apache/solr/search/similarities/TestNonDefinedSimilarityFactory.java
index dd30ca1f079..b5b9d2e60a9 100644
--- a/solr/core/src/test/org/apache/solr/search/similarities/TestNonDefinedSimilarityFactory.java
+++ b/solr/core/src/test/org/apache/solr/search/similarities/TestNonDefinedSimilarityFactory.java
@@ -17,8 +17,6 @@
package org.apache.solr.search.similarities;
import org.apache.lucene.search.similarities.BM25Similarity;
-import org.apache.lucene.search.similarity.LegacyBM25Similarity;
-import org.apache.lucene.util.Version;
import org.junit.After;
/**
@@ -44,23 +42,4 @@ public class TestNonDefinedSimilarityFactory extends BaseSimilarityTestCase {
assertEquals(0.75F, sim.getB(), 0.0F);
}
- public void testLegacyBM25BeforeV8() throws Exception {
- System.setProperty("tests.luceneMatchVersion", Version.LUCENE_7_0_0.toString());
- initCore("solrconfig-basic.xml","schema-tiny.xml");
- System.clearProperty("tests.luceneMatchVersion");
- LegacyBM25Similarity sim = getSimilarity("text", LegacyBM25Similarity.class);
- assertEquals(0.75F, sim.getB(), 0.0F);
- deleteCore();
-
- System.setProperty("tests.luceneMatchVersion", "5.0.0");
- initCore("solrconfig-basic.xml","schema-tiny.xml");
- System.clearProperty("tests.luceneMatchVersion");
- getSimilarity("text", LegacyBM25Similarity.class);
- deleteCore();
-
- System.setProperty("tests.luceneMatchVersion", "6.0.0");
- initCore("solrconfig-basic.xml","schema-tiny.xml");
- System.clearProperty("tests.luceneMatchVersion");
- getSimilarity("text", LegacyBM25Similarity.class);
- }
}