Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-5858: First iteration.

Adrien Grand09c2c4d0aa3e
diff --git a/build.xml b/build.xml
index 22b908a52e8..e537ef1f192 100644
--- a/build.xml
+++ b/build.xml
@@ -260,8 +260,8 @@
</copy>
<pathconvert property="eclipse.fileset.sourcefolders" pathsep="|" dirsep="/">
- <dirset dir="${basedir}/lucene" includes="**/src/java, **/src/resources, **/src/test, **/src/test-files, **/src/examples" excludes="tools/**, build/**, backwards/**" />
- <dirset dir="${basedir}/solr" includes="**/src/java, **/src/resources, **/src/test, **/src/test-files, **/src/examples" excludes="build/**" />
+ <dirset dir="${basedir}/lucene" includes="**/src/java, **/src/resources, **/src/test, **/src/test-resources, **/src/test-files, **/src/examples" excludes="tools/**, build/**, backwards/**" />
+ <dirset dir="${basedir}/solr" includes="**/src/java, **/src/resources, **/src/test, **/src/test-resources, **/src/test-files, **/src/examples" excludes="build/**" />
<map from="${basedir}/" to=""/>
</pathconvert>
<!-- TODO: find a better way to exclude duplicate JAR files & fix the servlet-api mess! -->
diff --git a/lucene/backward-codecs/build.xml b/lucene/backward-codecs/build.xml
new file mode 100644
index 00000000000..3de2979484b
--- /dev/null
+++ b/lucene/backward-codecs/build.xml
@@ -0,0 +1,26 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<project name="backward-codecs" default="default">
+
+ <description>
+ Codecs for older versions of Lucene.
+ </description>
+
+ <import file="../module-build.xml"/>
+
+</project>
diff --git a/lucene/backward-codecs/ivy.xml b/lucene/backward-codecs/ivy.xml
new file mode 100644
index 00000000000..6d86d6a0c6e
--- /dev/null
+++ b/lucene/backward-codecs/ivy.xml
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<ivy-module version="2.0">
+ <info organisation="org.apache.lucene" module="backward-codecs"/>
+</ivy-module>
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42Codec.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42Codec.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42Codec.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42Codec.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosReader.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosReader.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosReader.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosReader.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsProducer.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsProducer.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsProducer.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsProducer.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45Codec.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45Codec.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45Codec.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45Codec.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesConsumer.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesConsumer.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesConsumer.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesConsumer.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene45/package.html b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/package.html
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/package.html
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/package.html
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46Codec.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46Codec.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46Codec.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46Codec.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49Codec.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49Codec.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49Codec.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49Codec.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesConsumer.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesConsumer.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesConsumer.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesConsumer.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesFormat.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesFormat.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesFormat.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesFormat.java
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesProducer.java b/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesProducer.java
similarity index 100%
rename from lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesProducer.java
rename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesProducer.java
diff --git a/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.Codec b/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.Codec
new file mode 100644
index 00000000000..ccb80e45c7b
--- /dev/null
+++ b/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.Codec
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.lucene.codecs.lucene40.Lucene40Codec
+org.apache.lucene.codecs.lucene41.Lucene41Codec
+org.apache.lucene.codecs.lucene42.Lucene42Codec
+org.apache.lucene.codecs.lucene45.Lucene45Codec
+org.apache.lucene.codecs.lucene46.Lucene46Codec
+org.apache.lucene.codecs.lucene49.Lucene49Codec
diff --git a/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat b/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
new file mode 100644
index 00000000000..01ce305b441
--- /dev/null
+++ b/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.lucene.codecs.lucene42.Lucene42DocValuesFormat
+org.apache.lucene.codecs.lucene45.Lucene45DocValuesFormat
+org.apache.lucene.codecs.lucene49.Lucene49DocValuesFormat
diff --git a/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat b/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
new file mode 100644
index 00000000000..112a1698302
--- /dev/null
+++ b/lucene/backward-codecs/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
diff --git a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.Codec b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.Codec
new file mode 100644
index 00000000000..4868c997056
--- /dev/null
+++ b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.Codec
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.lucene.codecs.lucene40.Lucene40RWCodec
+org.apache.lucene.codecs.lucene41.Lucene41RWCodec
+org.apache.lucene.codecs.lucene42.Lucene42RWCodec
+org.apache.lucene.codecs.lucene45.Lucene45RWCodec
+org.apache.lucene.codecs.lucene46.Lucene46RWCodec
+org.apache.lucene.codecs.lucene49.Lucene49RWCodec
diff --git a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
new file mode 100644
index 00000000000..ef5b87ea244
--- /dev/null
+++ b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.lucene.codecs.lucene42.Lucene42RWDocValuesFormat
diff --git a/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
new file mode 100644
index 00000000000..c36d889e176
--- /dev/null
+++ b/lucene/backward-codecs/src/test-resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+org.apache.lucene.codecs.lucene40.Lucene40RWPostingsFormat
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesWriter.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40DocValuesWriter.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesWriter.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40DocValuesWriter.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosWriter.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosWriter.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosWriter.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosWriter.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsWriter.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40PostingsWriter.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsWriter.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40PostingsWriter.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWCodec.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWCodec.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWCodec.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWCodec.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWDocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWDocValuesFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWDocValuesFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWDocValuesFormat.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWNormsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWNormsFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWNormsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWNormsFormat.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWPostingsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWPostingsFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWPostingsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWPostingsFormat.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWStoredFieldsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWStoredFieldsFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWStoredFieldsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWStoredFieldsFormat.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWTermVectorsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWTermVectorsFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWTermVectorsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWTermVectorsFormat.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestBitVector.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestBitVector.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestBitVector.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestBitVector.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40NormsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40NormsFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40NormsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40NormsFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41/Lucene41RWCodec.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41RWCodec.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41/Lucene41RWCodec.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41RWCodec.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosWriter.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosWriter.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosWriter.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosWriter.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsConsumer.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42NormsConsumer.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsConsumer.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42NormsConsumer.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWCodec.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWCodec.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWCodec.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWCodec.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWDocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWDocValuesFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWDocValuesFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWDocValuesFormat.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWNormsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWNormsFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWNormsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWNormsFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42NormsFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/TestLucene42NormsFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42NormsFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/TestLucene42NormsFormat.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/Lucene45RWCodec.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/Lucene45RWCodec.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/Lucene45RWCodec.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/Lucene45RWCodec.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/Lucene45RWDocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/Lucene45RWDocValuesFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/Lucene45RWDocValuesFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/Lucene45RWDocValuesFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene45/TestLucene45DocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/TestLucene45DocValuesFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene45/TestLucene45DocValuesFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/TestLucene45DocValuesFormat.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene46/Lucene46RWCodec.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene46/Lucene46RWCodec.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene46/Lucene46RWCodec.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene46/Lucene46RWCodec.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/Lucene49RWCodec.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWCodec.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/Lucene49RWCodec.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWCodec.java
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/Lucene49RWDocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWDocValuesFormat.java
similarity index 100%
rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/Lucene49RWDocValuesFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWDocValuesFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene49/TestLucene49DocValuesFormat.java b/lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/TestLucene49DocValuesFormat.java
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/codecs/lucene49/TestLucene49DocValuesFormat.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/TestLucene49DocValuesFormat.java
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
similarity index 98%
rename from lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index ee9a19f94c4..4b73f43298b 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -167,8 +167,8 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
}
private void updateBinary(IndexWriter writer, String id, String f, String cf, long value) throws IOException {
- writer.updateBinaryDocValue(new Term("id", id), f, TestBinaryDocValuesUpdates.toBytes(value));
- writer.updateBinaryDocValue(new Term("id", id), cf, TestBinaryDocValuesUpdates.toBytes(value*2));
+ writer.updateBinaryDocValue(new Term("id", id), f, TestDocValuesUpdatesOnOldSegments.toBytes(value));
+ writer.updateBinaryDocValue(new Term("id", id), cf, TestDocValuesUpdatesOnOldSegments.toBytes(value*2));
}
/* // Creates an index with DocValues updates
@@ -191,10 +191,10 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
doc.add(new NumericDocValuesField("ndv1_c", i*2));
doc.add(new NumericDocValuesField("ndv2", i*3));
doc.add(new NumericDocValuesField("ndv2_c", i*6));
- doc.add(new BinaryDocValuesField("bdv1", TestBinaryDocValuesUpdates.toBytes(i)));
- doc.add(new BinaryDocValuesField("bdv1_c", TestBinaryDocValuesUpdates.toBytes(i*2)));
- doc.add(new BinaryDocValuesField("bdv2", TestBinaryDocValuesUpdates.toBytes(i*3)));
- doc.add(new BinaryDocValuesField("bdv2_c", TestBinaryDocValuesUpdates.toBytes(i*6)));
+ doc.add(new BinaryDocValuesField("bdv1", TestDocValuesUpdatesOnOldSegments.toBytes(i)));
+ doc.add(new BinaryDocValuesField("bdv1_c", TestDocValuesUpdatesOnOldSegments.toBytes(i*2)));
+ doc.add(new BinaryDocValuesField("bdv2", TestDocValuesUpdatesOnOldSegments.toBytes(i*3)));
+ doc.add(new BinaryDocValuesField("bdv2_c", TestDocValuesUpdatesOnOldSegments.toBytes(i*6)));
writer.addDocument(doc);
if ((i+1) % 10 == 0) {
writer.commit(); // flush every 10 docs
@@ -1085,7 +1085,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
BinaryDocValues bdvf = r.getBinaryDocValues(f);
BinaryDocValues bdvcf = r.getBinaryDocValues(cf);
for (int i = 0; i < r.maxDoc(); i++) {
- assertEquals(TestBinaryDocValuesUpdates.getValue(bdvcf, i), TestBinaryDocValuesUpdates.getValue(bdvf, i)*2);
+ assertEquals(TestDocValuesUpdatesOnOldSegments.getValue(bdvcf, i), TestDocValuesUpdatesOnOldSegments.getValue(bdvf, i)*2);
}
}
diff --git a/lucene/core/src/test/org/apache/lucene/index/dvupdates.48.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/dvupdates.48.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/dvupdates.48.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/dvupdates.48.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.40.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.40.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.40.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.40.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.40.optimized.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.optimized.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.40.optimized.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.optimized.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.40.optimized.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.optimized.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.40.optimized.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.optimized.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.41.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.41.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.41.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.41.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.41.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.41.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.41.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.41.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.42.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.42.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.42.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.42.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.42.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.42.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.42.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.42.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.45.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.45.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.45.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.45.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.45.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.45.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.45.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.45.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.461.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.461.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.461.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.461.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.461.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.461.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.461.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.461.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.49.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.49.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.49.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.49.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/index.49.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/index.49.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/index.49.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.49.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/moreterms.40.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/moreterms.40.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/moreterms.40.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/moreterms.40.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.19.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.19.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.19.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.19.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.19.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.19.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.19.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.19.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.20.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.20.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.20.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.20.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.20.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.20.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.20.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.20.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.21.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.21.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.21.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.21.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.21.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.21.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.21.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.21.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.22.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.22.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.22.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.22.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.22.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.22.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.22.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.22.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.23.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.23.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.23.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.23.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.23.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.23.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.23.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.23.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.24.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.24.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.24.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.24.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.24.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.24.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.24.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.24.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.29.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.29.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.29.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.29.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.29.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.29.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.29.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.29.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.30.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.30.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.30.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.30.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.30.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.30.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.30.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.30.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.31.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.31.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.31.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.31.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.31.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.31.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.31.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.31.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.32.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.32.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.32.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.32.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.32.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.32.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.32.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.32.nocfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.34.cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.34.cfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.34.cfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.34.cfs.zip
diff --git a/lucene/core/src/test/org/apache/lucene/index/unsupported.34.nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.34.nocfs.zip
similarity index 100%
rename from lucene/core/src/test/org/apache/lucene/index/unsupported.34.nocfs.zip
rename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.34.nocfs.zip
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 14095ede940..acdb275f404 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -227,6 +227,7 @@
<property name="src.dir" location="src/java"/>
<property name="resources.dir" location="${src.dir}/../resources"/>
<property name="tests.src.dir" location="src/test"/>
+ <property name="tests.resources.dir" location="${tests.src.dir}/../test-resources"/>
<available property="module.has.tests" type="dir" file="${tests.src.dir}"/>
<property name="build.dir" location="build"/>
<!-- Needed in case a module needs the original build, also for compile-tools to be called from a module -->
@@ -794,10 +795,14 @@
</target>
<target name="compile-test" depends="compile-core,compile-test-framework">
- <compile-test-macro srcdir="${tests.src.dir}" destdir="${build.dir}/classes/test"
- test.classpath="test.classpath"/>
+ <compile-test-macro srcdir="${tests.src.dir}" destdir="${build.dir}/classes/test" test.classpath="test.classpath"/>
+
+ <!-- Copy the resources folder (if existent) -->
+ <copy todir="${build.dir}/classes/test">
+ <fileset dir="${tests.resources.dir}" erroronmissingdir="no"/>
+ </copy>
</target>
-
+
<macrodef name="compile-test-macro" description="Compiles junit tests.">
<attribute name="srcdir"/>
<attribute name="destdir"/>
@@ -1720,6 +1725,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<!-- TODO: Check all resource files. Currently not all stopword and similar files have no header! -->
<fileset dir="${resources.dir}" includes="META-INF/**" erroronmissingdir="false"/>
+ <fileset dir="${tests.resources.dir}" includes="META-INF/**" erroronmissingdir="false"/>
<!-- BSD 4-clause stuff (is disallowed below) -->
<rat:substringMatcher licenseFamilyCategory="BSD4 "
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java
index d8cf4692cbf..5ffcb6c5eea 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java
@@ -23,7 +23,6 @@ import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.codecs.StoredFieldsFormat;
import org.apache.lucene.codecs.StoredFieldsReader;
import org.apache.lucene.codecs.StoredFieldsWriter;
-import org.apache.lucene.codecs.lucene40.Lucene40StoredFieldsFormat;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.MergePolicy;
import org.apache.lucene.index.SegmentInfo;
@@ -32,14 +31,12 @@ import org.apache.lucene.store.IOContext;
/**
- * A {@link StoredFieldsFormat} that is very similar to
- * {@link Lucene40StoredFieldsFormat} but compresses documents in chunks in
+ * A {@link StoredFieldsFormat} that compresses documents in chunks in
* order to improve the compression ratio.
* <p>
* For a chunk size of <tt>chunkSize</tt> bytes, this {@link StoredFieldsFormat}
* does not support documents larger than (<tt>2<sup>31</sup> - chunkSize</tt>)
- * bytes. In case this is a problem, you should use another format, such as
- * {@link Lucene40StoredFieldsFormat}.
+ * bytes.
* <p>
* For optimal performance, you should use a {@link MergePolicy} that returns
* segments that have the biggest byte size first.
@@ -81,8 +78,6 @@ public class CompressingStoredFieldsFormat extends StoredFieldsFormat {
* <p>
* <code>chunkSize</code> is the minimum byte size of a chunk of documents.
* A value of <code>1</code> can make sense if there is redundancy across
- * fields. In that case, both performance and compression ratio should be
- * better than with {@link Lucene40StoredFieldsFormat} with compressed
* fields.
* <p>
* Higher values of <code>chunkSize</code> should improve the compression
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.java
index 49d97ead5f7..a00ec122ce0 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.java
@@ -22,7 +22,6 @@ import org.apache.lucene.codecs.StoredFieldsFormat;
import org.apache.lucene.codecs.compressing.CompressingStoredFieldsFormat;
import org.apache.lucene.codecs.compressing.CompressingStoredFieldsIndexWriter;
import org.apache.lucene.codecs.compressing.CompressionMode;
-import org.apache.lucene.codecs.lucene40.Lucene40StoredFieldsFormat;
import org.apache.lucene.index.StoredFieldVisitor;
import org.apache.lucene.store.DataOutput;
import org.apache.lucene.util.packed.PackedInts;
@@ -112,9 +111,7 @@ import org.apache.lucene.util.packed.PackedInts;
* </ol>
* <p><b>Known limitations</b></p>
* <p>This {@link StoredFieldsFormat} does not support individual documents
- * larger than (<tt>2<sup>31</sup> - 2<sup>14</sup></tt>) bytes. In case this
- * is a problem, you should use another format, such as
- * {@link Lucene40StoredFieldsFormat}.</p>
+ * larger than (<tt>2<sup>31</sup> - 2<sup>14</sup></tt>) bytes.</p>
* @lucene.experimental
*/
public final class Lucene41StoredFieldsFormat extends CompressingStoredFieldsFormat {
diff --git a/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.Codec b/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.Codec
index 890fffae4f2..11a1ea920b4 100644
--- a/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.Codec
+++ b/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.Codec
@@ -13,10 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-org.apache.lucene.codecs.lucene40.Lucene40Codec
-org.apache.lucene.codecs.lucene41.Lucene41Codec
-org.apache.lucene.codecs.lucene42.Lucene42Codec
-org.apache.lucene.codecs.lucene45.Lucene45Codec
-org.apache.lucene.codecs.lucene46.Lucene46Codec
-org.apache.lucene.codecs.lucene49.Lucene49Codec
org.apache.lucene.codecs.lucene410.Lucene410Codec
diff --git a/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat b/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
index 0dbc7e81060..8cc6f70d0f4 100644
--- a/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
+++ b/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
@@ -13,7 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-org.apache.lucene.codecs.lucene42.Lucene42DocValuesFormat
-org.apache.lucene.codecs.lucene45.Lucene45DocValuesFormat
-org.apache.lucene.codecs.lucene49.Lucene49DocValuesFormat
org.apache.lucene.codecs.lucene410.Lucene410DocValuesFormat
diff --git a/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat b/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
index 023d9c9e1a6..95e92675165 100644
--- a/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
+++ b/lucene/core/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
@@ -13,5 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat
org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java
index cf296f50167..485ed37ff34 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java
@@ -18,18 +18,12 @@ package org.apache.lucene.codecs.lucene41;
*/
import org.apache.lucene.codecs.Codec;
+import org.apache.lucene.codecs.lucene410.Lucene410Codec;
import org.apache.lucene.index.BaseStoredFieldsFormatTestCase;
-import org.junit.BeforeClass;
public class TestLucene41StoredFieldsFormat extends BaseStoredFieldsFormatTestCase {
-
- @BeforeClass
- public static void beforeClass() {
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec
- }
-
@Override
protected Codec getCodec() {
- return new Lucene41RWCodec();
+ return new Lucene410Codec();
}
}
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene49/TestLucene49NormsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene49/TestLucene49NormsFormat.java
index b2f0d90b170..f84d61a1882 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene49/TestLucene49NormsFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene49/TestLucene49NormsFormat.java
@@ -18,19 +18,14 @@ package org.apache.lucene.codecs.lucene49;
*/
import org.apache.lucene.codecs.Codec;
+import org.apache.lucene.codecs.lucene410.Lucene410Codec;
import org.apache.lucene.index.BaseNormsFormatTestCase;
-import org.junit.BeforeClass;
/**
* Tests Lucene49NormsFormat
*/
public class TestLucene49NormsFormat extends BaseNormsFormatTestCase {
- private final Codec codec = new Lucene49RWCodec();
-
- @BeforeClass
- public static void beforeClass() {
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true; // explicitly instantiates ancient codec
- }
+ private final Codec codec = new Lucene410Codec();
@Override
protected Codec getCodec() {
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java b/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
index 7df11e1f258..38d23e50dc7 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
@@ -9,13 +9,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.analysis.MockTokenizer;
-import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.DocValuesFormat;
import org.apache.lucene.codecs.asserting.AssertingDocValuesFormat;
-import org.apache.lucene.codecs.lucene40.Lucene40RWCodec;
-import org.apache.lucene.codecs.lucene41.Lucene41RWCodec;
-import org.apache.lucene.codecs.lucene42.Lucene42RWCodec;
-import org.apache.lucene.codecs.lucene45.Lucene45RWCodec;
import org.apache.lucene.codecs.lucene410.Lucene410Codec;
import org.apache.lucene.codecs.lucene410.Lucene410DocValuesFormat;
import org.apache.lucene.document.BinaryDocValuesField;
@@ -32,7 +27,6 @@ import org.apache.lucene.util.Bits;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
import org.apache.lucene.util.TestUtil;
import org.junit.Test;
@@ -55,8 +49,6 @@ import com.carrotsearch.randomizedtesting.generators.RandomPicks;
* limitations under the License.
*/
-@SuppressCodecs({"Lucene40","Lucene41","Lucene42","Lucene45"})
-@SuppressWarnings("resource")
public class TestBinaryDocValuesUpdates extends LuceneTestCase {
static long getValue(BinaryDocValues bdv, int idx) {
@@ -861,38 +853,6 @@ public class TestBinaryDocValuesUpdates extends LuceneTestCase {
dir.close();
}
- public void testUpdateOldSegments() throws Exception {
- Codec[] oldCodecs = new Codec[] { new Lucene40RWCodec(), new Lucene41RWCodec(), new Lucene42RWCodec(), new Lucene45RWCodec() };
- Directory dir = newDirectory();
-
- boolean oldValue = OLD_FORMAT_IMPERSONATION_IS_ACTIVE;
- // create a segment with an old Codec
- IndexWriterConfig conf = newIndexWriterConfig(new MockAnalyzer(random()));
- conf.setCodec(oldCodecs[random().nextInt(oldCodecs.length)]);
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- IndexWriter writer = new IndexWriter(dir, conf);
- Document doc = new Document();
- doc.add(new StringField("id", "doc", Store.NO));
- doc.add(new BinaryDocValuesField("f", toBytes(5L)));
- writer.addDocument(doc);
- writer.close();
-
- conf = newIndexWriterConfig(new MockAnalyzer(random()));
- writer = new IndexWriter(dir, conf);
- writer.updateBinaryDocValue(new Term("id", "doc"), "f", toBytes(4L));
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = false;
- try {
- writer.close();
- fail("should not have succeeded to update a segment written with an old Codec");
- } catch (UnsupportedOperationException e) {
- writer.rollback();
- } finally {
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = oldValue;
- }
-
- dir.close();
- }
-
public void testStressMultiThreading() throws Exception {
final Directory dir = newDirectory();
IndexWriterConfig conf = newIndexWriterConfig(new MockAnalyzer(random()));
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java b/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
index 3c8f89224d5..e0a0a889628 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
@@ -27,9 +27,6 @@ import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.FieldsConsumer;
import org.apache.lucene.codecs.FieldsProducer;
-import org.apache.lucene.codecs.lucene40.Lucene40RWCodec;
-import org.apache.lucene.codecs.lucene41.Lucene41RWCodec;
-import org.apache.lucene.codecs.lucene42.Lucene42RWCodec;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field.Store;
import org.apache.lucene.document.NumericDocValuesField;
@@ -850,29 +847,4 @@ public class TestCodecs extends LuceneTestCase {
dir.close();
}
- public void testDisableImpersonation() throws Exception {
- Codec[] oldCodecs = new Codec[] { new Lucene40RWCodec(), new Lucene41RWCodec(), new Lucene42RWCodec() };
- Directory dir = newDirectory();
- IndexWriterConfig conf = newIndexWriterConfig(new MockAnalyzer(random()));
- conf.setCodec(oldCodecs[random().nextInt(oldCodecs.length)]);
- IndexWriter writer = new IndexWriter(dir, conf);
-
- Document doc = new Document();
- doc.add(new StringField("f", "bar", Store.YES));
- doc.add(new NumericDocValuesField("n", 18L));
-
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = false;
- try {
- writer.addDocument(doc);
- writer.close();
- fail("should not have succeeded to impersonate an old format!");
- } catch (UnsupportedOperationException e) {
- writer.rollback();
- } finally {
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- }
-
- dir.close();
- }
-
}
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java b/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
index dcb765c20a7..93d4fac4411 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
@@ -12,10 +12,6 @@ import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.DocValuesFormat;
import org.apache.lucene.codecs.asserting.AssertingDocValuesFormat;
-import org.apache.lucene.codecs.lucene40.Lucene40RWCodec;
-import org.apache.lucene.codecs.lucene41.Lucene41RWCodec;
-import org.apache.lucene.codecs.lucene42.Lucene42RWCodec;
-import org.apache.lucene.codecs.lucene45.Lucene45RWCodec;
import org.apache.lucene.codecs.lucene410.Lucene410DocValuesFormat;
import org.apache.lucene.codecs.lucene410.Lucene410Codec;
import org.apache.lucene.document.BinaryDocValuesField;
@@ -853,39 +849,6 @@ public class TestNumericDocValuesUpdates extends LuceneTestCase {
dir.close();
}
- @Test
- public void testUpdateOldSegments() throws Exception {
- Codec[] oldCodecs = new Codec[] { new Lucene40RWCodec(), new Lucene41RWCodec(), new Lucene42RWCodec(), new Lucene45RWCodec() };
- Directory dir = newDirectory();
-
- boolean oldValue = OLD_FORMAT_IMPERSONATION_IS_ACTIVE;
- // create a segment with an old Codec
- IndexWriterConfig conf = newIndexWriterConfig(new MockAnalyzer(random()));
- conf.setCodec(oldCodecs[random().nextInt(oldCodecs.length)]);
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- IndexWriter writer = new IndexWriter(dir, conf);
- Document doc = new Document();
- doc.add(new StringField("id", "doc", Store.NO));
- doc.add(new NumericDocValuesField("f", 5));
- writer.addDocument(doc);
- writer.close();
-
- conf = newIndexWriterConfig(new MockAnalyzer(random()));
- writer = new IndexWriter(dir, conf);
- writer.updateNumericDocValue(new Term("id", "doc"), "f", 4L);
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = false;
- try {
- writer.close();
- fail("should not have succeeded to update a segment written with an old Codec");
- } catch (UnsupportedOperationException e) {
- writer.rollback();
- } finally {
- OLD_FORMAT_IMPERSONATION_IS_ACTIVE = oldValue;
- }
-
- dir.close();
- }
-
@Test
public void testStressMultiThreading() throws Exception {
final Directory dir = newDirectory();
diff --git a/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java b/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java
index 712514b63bf..fe61a2af69e 100644
--- a/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java
+++ b/lucene/core/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java
@@ -55,7 +55,7 @@ public class TestFileSwitchDirectory extends BaseDirectoryTestCase {
IndexWriter writer = new IndexWriter(
fsd,
new IndexWriterConfig(new MockAnalyzer(random())).
- setMergePolicy(newLogMergePolicy(false)).setCodec(Codec.forName("Lucene40")).setUseCompoundFile(false)
+ setMergePolicy(newLogMergePolicy(false)).setCodec(Codec.forName("Lucene410")).setUseCompoundFile(false)
);
TestIndexWriterReader.createIndexNoClose(true, "ram", writer);
IndexReader reader = DirectoryReader.open(writer, true);
diff --git a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheVsDocValues.java b/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheVsDocValues.java
index af67fb8fa1f..304cafa8093 100644
--- a/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheVsDocValues.java
+++ b/lucene/misc/src/test/org/apache/lucene/uninverting/TestFieldCacheVsDocValues.java
@@ -25,7 +25,6 @@ import java.util.List;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.MockAnalyzer;
-import org.apache.lucene.codecs.lucene42.Lucene42DocValuesFormat;
import org.apache.lucene.document.BinaryDocValuesField;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
@@ -211,6 +210,8 @@ public class TestFieldCacheVsDocValues extends LuceneTestCase {
d.close();
}
+ private static final int LARGE_BINARY_FIELD_LENGTH = (1 << 15) - 2;
+
// TODO: get this out of here and into the deprecated codecs (4.0, 4.2)
public void testHugeBinaryValueLimit() throws Exception {
// We only test DVFormats that have a limit
@@ -226,7 +227,7 @@ public class TestFieldCacheVsDocValues extends LuceneTestCase {
// Sometimes make all values fixed length since some
// codecs have different code paths for this:
numDocs = TestUtil.nextInt(random(), 10, 20);
- fixedLength = Lucene42DocValuesFormat.MAX_BINARY_FIELD_LENGTH;
+ fixedLength = LARGE_BINARY_FIELD_LENGTH;
} else {
numDocs = TestUtil.nextInt(random(), 100, 200);
}
@@ -243,9 +244,9 @@ public class TestFieldCacheVsDocValues extends LuceneTestCase {
if (doFixed) {
numBytes = fixedLength;
} else if (docID == 0 || random().nextInt(5) == 3) {
- numBytes = Lucene42DocValuesFormat.MAX_BINARY_FIELD_LENGTH;
+ numBytes = LARGE_BINARY_FIELD_LENGTH;
} else {
- numBytes = TestUtil.nextInt(random(), 1, Lucene42DocValuesFormat.MAX_BINARY_FIELD_LENGTH);
+ numBytes = TestUtil.nextInt(random(), 1, LARGE_BINARY_FIELD_LENGTH);
}
totalBytes += numBytes;
if (totalBytes > 5 * 1024*1024) {
diff --git a/lucene/module-build.xml b/lucene/module-build.xml
index df0e9d7ecae..cc5ca70fc52 100644
--- a/lucene/module-build.xml
+++ b/lucene/module-build.xml
@@ -433,6 +433,28 @@
<property name="codecs-javadocs.uptodate" value="true"/>
</target>
+ <property name="backward-codecs.jar" value="${common.dir}/build/backward-codecs/lucene-backward-codecs-${version}.jar"/>
+ <target name="check-backward-codecs-uptodate" unless="backward-codecs.uptodate">
+ <module-uptodate name="backward-codecs" jarfile="${backward-codecs.jar}" property="backward-codecs.uptodate"/>
+ </target>
+ <target name="jar-backward-codecs" unless="backward-codecs.uptodate" depends="check-backward-codecs-uptodate">
+ <ant dir="${common.dir}/backward-codecs" target="jar-core" inheritall="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </ant>
+ <property name="backward-codecs.uptodate" value="true"/>
+ </target>
+
+ <property name="backward-codecs-javadoc.jar" value="${common.dir}/build/backward-codecs/lucene-backward-codecs-${version}-javadoc.jar"/>
+ <target name="check-backward-codecs-javadocs-uptodate" unless="backward-codecs-javadocs.uptodate">
+ <module-uptodate name="backward-codecs" jarfile="${backward-codecs-javadoc.jar}" property="backward-codecs-javadocs.uptodate"/>
+ </target>
+ <target name="javadocs-backward-codecs" unless="backward-codecs-javadocs.uptodate" depends="check-backward-codecs-javadocs-uptodate">
+ <ant dir="${common.dir}/backward-codecs" target="javadocs" inheritAll="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </ant>
+ <property name="backward-codecs-javadocs.uptodate" value="true"/>
+ </target>
+
<property name="expressions.jar" value="${common.dir}/build/expressions/lucene-expressions-${version}.jar"/>
<target name="check-expressions-uptodate" unless="expressions.uptodate">
<module-uptodate name="expressions" jarfile="${expressions.jar}" property="expressions.uptodate"/>
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/package.html b/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/package.html
deleted file mode 100644
index c83302cf5b7..00000000000
--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body>
-Support for testing {@link org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat}.
-</body>
-</html>
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41/package.html b/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41/package.html
deleted file mode 100644
index f9d00126b29..00000000000
--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body>
-Support for testing {@link org.apache.lucene.codecs.lucene41.Lucene41Codec}.
-</body>
-</html>
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/package.html b/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/package.html
deleted file mode 100644
index f1c62d1e049..00000000000
--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body>
-Support for testing {@link org.apache.lucene.codecs.lucene42.Lucene42Codec}.
-</body>
-</html>
\ No newline at end of file
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/package.html b/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/package.html
deleted file mode 100644
index 85480b8ce6d..00000000000
--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body>
-Support for testing {@link org.apache.lucene.codecs.lucene45.Lucene45Codec}.
-</body>
-</html>
\ No newline at end of file
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene46/package.html b/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene46/package.html
deleted file mode 100644
index 8abed4c2b1d..00000000000
--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene46/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body>
-Support for testing {@link org.apache.lucene.codecs.lucene46.Lucene46Codec}.
-</body>
-</html>
\ No newline at end of file
diff --git a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/package.html b/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/package.html
deleted file mode 100644
index 30924a60f21..00000000000
--- a/lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-<body>
-Support for testing {@link org.apache.lucene.codecs.lucene49.Lucene49Codec}.
-</body>
-</html>
\ No newline at end of file
diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
index efc53f84a32..6af4815a49d 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
@@ -34,14 +34,7 @@ import org.apache.lucene.codecs.PostingsFormat;
import org.apache.lucene.codecs.asserting.AssertingCodec;
import org.apache.lucene.codecs.cheapbastard.CheapBastardCodec;
import org.apache.lucene.codecs.compressing.CompressingCodec;
-import org.apache.lucene.codecs.lucene40.Lucene40RWCodec;
-import org.apache.lucene.codecs.lucene40.Lucene40RWPostingsFormat;
-import org.apache.lucene.codecs.lucene41.Lucene41RWCodec;
import org.apache.lucene.codecs.lucene410.Lucene410Codec;
-import org.apache.lucene.codecs.lucene42.Lucene42RWCodec;
-import org.apache.lucene.codecs.lucene45.Lucene45RWCodec;
-import org.apache.lucene.codecs.lucene46.Lucene46RWCodec;
-import org.apache.lucene.codecs.lucene49.Lucene49RWCodec;
import org.apache.lucene.codecs.mockrandom.MockRandomPostingsFormat;
import org.apache.lucene.codecs.simpletext.SimpleTextCodec;
import org.apache.lucene.index.RandomCodec;
@@ -160,56 +153,7 @@ final class TestRuleSetupAndRestoreClassEnv extends AbstractBeforeAfterRule {
savedCodec = Codec.getDefault();
int randomVal = random.nextInt(11);
- if ("Lucene40".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) &&
- "random".equals(TEST_POSTINGSFORMAT) &&
- "random".equals(TEST_DOCVALUESFORMAT) &&
- randomVal == 0 &&
- !shouldAvoidCodec("Lucene40"))) {
- codec = Codec.forName("Lucene40");
- LuceneTestCase.OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- assert codec instanceof Lucene40RWCodec : "fix your classpath to have tests-framework.jar before lucene-core.jar";
- assert (PostingsFormat.forName("Lucene40") instanceof Lucene40RWPostingsFormat) : "fix your classpath to have tests-framework.jar before lucene-core.jar";
- } else if ("Lucene41".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) &&
- "random".equals(TEST_POSTINGSFORMAT) &&
- "random".equals(TEST_DOCVALUESFORMAT) &&
- randomVal == 1 &&
- !shouldAvoidCodec("Lucene41"))) {
- codec = Codec.forName("Lucene41");
- LuceneTestCase.OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- assert codec instanceof Lucene41RWCodec : "fix your classpath to have tests-framework.jar before lucene-core.jar";
- } else if ("Lucene42".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) &&
- "random".equals(TEST_POSTINGSFORMAT) &&
- "random".equals(TEST_DOCVALUESFORMAT) &&
- randomVal == 2 &&
- !shouldAvoidCodec("Lucene42"))) {
- codec = Codec.forName("Lucene42");
- LuceneTestCase.OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- assert codec instanceof Lucene42RWCodec : "fix your classpath to have tests-framework.jar before lucene-core.jar";
- } else if ("Lucene45".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) &&
- "random".equals(TEST_POSTINGSFORMAT) &&
- "random".equals(TEST_DOCVALUESFORMAT) &&
- randomVal == 3 &&
- !shouldAvoidCodec("Lucene45"))) {
- codec = Codec.forName("Lucene45");
- LuceneTestCase.OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- assert codec instanceof Lucene45RWCodec : "fix your classpath to have tests-framework.jar before lucene-core.jar";
- } else if ("Lucene46".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) &&
- "random".equals(TEST_POSTINGSFORMAT) &&
- "random".equals(TEST_DOCVALUESFORMAT) &&
- randomVal == 4 &&
- !shouldAvoidCodec("Lucene46"))) {
- codec = Codec.forName("Lucene46");
- LuceneTestCase.OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- assert codec instanceof Lucene46RWCodec : "fix your classpath to have tests-framework.jar before lucene-core.jar";
- } else if ("Lucene49".equals(TEST_CODEC) || ("random".equals(TEST_CODEC) &&
- "random".equals(TEST_POSTINGSFORMAT) &&
- "random".equals(TEST_DOCVALUESFORMAT) &&
- randomVal == 5 &&
- !shouldAvoidCodec("Lucene49"))) {
- codec = Codec.forName("Lucene49");
- LuceneTestCase.OLD_FORMAT_IMPERSONATION_IS_ACTIVE = true;
- assert codec instanceof Lucene49RWCodec : "fix your classpath to have tests-framework.jar before lucene-core.jar";
- } else if (("random".equals(TEST_POSTINGSFORMAT) == false) || ("random".equals(TEST_DOCVALUESFORMAT) == false)) {
+ if (("random".equals(TEST_POSTINGSFORMAT) == false) || ("random".equals(TEST_DOCVALUESFORMAT) == false)) {
// the user wired postings or DV: this is messy
// refactor into RandomCodec....
diff --git a/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.Codec b/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.Codec
index 2f5cc9212d1..282f5dd20c8 100644
--- a/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.Codec
+++ b/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.Codec
@@ -19,9 +19,3 @@ org.apache.lucene.codecs.compressing.FastCompressingCodec
org.apache.lucene.codecs.compressing.FastDecompressionCompressingCodec
org.apache.lucene.codecs.compressing.HighCompressionCompressingCodec
org.apache.lucene.codecs.compressing.dummy.DummyCompressingCodec
-org.apache.lucene.codecs.lucene40.Lucene40RWCodec
-org.apache.lucene.codecs.lucene41.Lucene41RWCodec
-org.apache.lucene.codecs.lucene42.Lucene42RWCodec
-org.apache.lucene.codecs.lucene45.Lucene45RWCodec
-org.apache.lucene.codecs.lucene46.Lucene46RWCodec
-org.apache.lucene.codecs.lucene49.Lucene49RWCodec
diff --git a/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat b/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
index 2086be1f0e7..d1798334486 100644
--- a/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
+++ b/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
@@ -14,4 +14,3 @@
# limitations under the License.
org.apache.lucene.codecs.asserting.AssertingDocValuesFormat
-org.apache.lucene.codecs.lucene42.Lucene42RWDocValuesFormat
diff --git a/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat b/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
index f85f32d7550..ed5309c7e03 100644
--- a/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
+++ b/lucene/test-framework/src/resources/META-INF/services/org.apache.lucene.codecs.PostingsFormat
@@ -21,4 +21,3 @@ org.apache.lucene.codecs.lucene41vargap.Lucene41VarGapFixedInterval
org.apache.lucene.codecs.lucene41vargap.Lucene41VarGapDocFreqInterval
org.apache.lucene.codecs.bloom.TestBloomFilteredLucene41Postings
org.apache.lucene.codecs.asserting.AssertingPostingsFormat
-org.apache.lucene.codecs.lucene40.Lucene40RWPostingsFormat
diff --git a/solr/common-build.xml b/solr/common-build.xml
index 8a33d968014..c14e786da9a 100644
--- a/solr/common-build.xml
+++ b/solr/common-build.xml
@@ -88,6 +88,7 @@
<pathelement location="${analyzers-kuromoji.jar}"/>
<pathelement location="${analyzers-phonetic.jar}"/>
<pathelement location="${codecs.jar}"/>
+ <pathelement location="${backward-codecs.jar}"/>
<pathelement location="${highlighter.jar}"/>
<pathelement location="${memory.jar}"/>
<pathelement location="${misc.jar}"/>