Apache Lucene open-source search software
LUCENE-5858: First iteration.
Adrien Grand09c2c4d0aa3e
diff --git a/build.xml b/build.xmlindex 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.xmlnew file mode 100644index 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.xmlnew file mode 100644index 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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40Codec.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40NormsReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsBaseFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SegmentInfoWriter.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42Codec.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42Codec.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesProducer.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosReader.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsProducer.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsProducer.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45Codec.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45Codec.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesConsumer.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesConsumer.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/Lucene45DocValuesProducer.javadiff --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.htmlsimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene45/package.htmlrename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene45/package.htmldiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46Codec.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46Codec.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49Codec.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49Codec.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesConsumer.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesConsumer.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesFormat.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesProducer.javarename to lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene49/Lucene49DocValuesProducer.javadiff --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.Codecnew file mode 100644index 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.Lucene49Codecdiff --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.DocValuesFormatnew file mode 100644index 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.Lucene49DocValuesFormatdiff --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.PostingsFormatnew file mode 100644index 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.Lucene40PostingsFormatdiff --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.Codecnew file mode 100644index 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.Lucene49RWCodecdiff --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.DocValuesFormatnew file mode 100644index 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.Lucene42RWDocValuesFormatdiff --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.PostingsFormatnew file mode 100644index 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.Lucene40RWPostingsFormatdiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40DocValuesWriter.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40DocValuesWriter.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosWriter.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosWriter.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40PostingsWriter.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40PostingsWriter.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWCodec.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWCodec.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWDocValuesFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWDocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWNormsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWNormsFormat.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWPostingsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWPostingsFormat.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWStoredFieldsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWStoredFieldsFormat.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40RWTermVectorsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40RWTermVectorsFormat.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40SkipListWriter.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40StoredFieldsWriter.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/Lucene40TermVectorsWriter.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestBitVector.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestBitVector.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40DocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40NormsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40NormsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40PostingsReader.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40StoredFieldsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestLucene40TermVectorsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene40/TestReuseDocsEnum.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene41/Lucene41RWCodec.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene41/Lucene41RWCodec.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42DocValuesConsumer.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosWriter.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosWriter.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42NormsConsumer.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42NormsConsumer.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWCodec.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWCodec.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWDocValuesFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWDocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene42/Lucene42RWNormsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/Lucene42RWNormsFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/TestLucene42DocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene42/TestLucene42NormsFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene42/TestLucene42NormsFormat.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/Lucene45RWCodec.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/Lucene45RWCodec.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene45/Lucene45RWDocValuesFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/Lucene45RWDocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene45/TestLucene45DocValuesFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene45/TestLucene45DocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene46/Lucene46RWCodec.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene46/Lucene46RWCodec.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/Lucene49RWCodec.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWCodec.javadiff --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.javasimilarity index 100%rename from lucene/test-framework/src/java/org/apache/lucene/codecs/lucene49/Lucene49RWDocValuesFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/Lucene49RWDocValuesFormat.javadiff --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.javasimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/codecs/lucene49/TestLucene49DocValuesFormat.javarename to lucene/backward-codecs/src/test/org/apache/lucene/codecs/lucene49/TestLucene49DocValuesFormat.javadiff --git a/lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.javasimilarity index 98%rename from lucene/core/src/test/org/apache/lucene/index/TestBackwardsCompatibility.javarename to lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.javaindex 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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/dvupdates.48.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/dvupdates.48.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.40.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.40.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.40.optimized.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.optimized.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.40.optimized.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.40.optimized.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.41.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.41.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.41.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.41.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.42.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.42.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.42.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.42.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.45.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.45.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.45.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.45.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.461.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.461.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.461.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.461.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.49.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.49.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/index.49.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/index.49.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/moreterms.40.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/moreterms.40.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.19.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.19.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.19.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.19.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.20.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.20.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.20.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.20.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.21.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.21.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.21.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.21.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.22.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.22.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.22.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.22.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.23.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.23.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.23.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.23.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.24.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.24.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.24.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.24.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.29.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.29.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.29.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.29.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.30.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.30.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.30.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.30.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.31.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.31.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.31.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.31.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.32.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.32.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.32.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.32.nocfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.34.cfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.34.cfs.zipdiff --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.zipsimilarity index 100%rename from lucene/core/src/test/org/apache/lucene/index/unsupported.34.nocfs.ziprename to lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.34.nocfs.zipdiff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 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.javaindex 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 compressiondiff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene41/Lucene41StoredFieldsFormat.javaindex 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.Codecindex 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.Lucene49Codecorg.apache.lucene.codecs.lucene410.Lucene410Codecdiff --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.DocValuesFormatindex 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.Lucene49DocValuesFormatorg.apache.lucene.codecs.lucene410.Lucene410DocValuesFormatdiff --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.PostingsFormatindex 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.Lucene40PostingsFormatorg.apache.lucene.codecs.lucene41.Lucene41PostingsFormatdiff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene41/TestLucene41StoredFieldsFormat.javaindex 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- }-@Overrideprotected 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.javaindex 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();@Overrideprotected 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.javaindex 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.javaindex 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.javaindex 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();- }-@Testpublic 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.javaindex 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.javaindex 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.xmlindex 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.htmldeleted file mode 100644index 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.htmldeleted file mode 100644index 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.htmldeleted file mode 100644index 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 filediff --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.htmldeleted file mode 100644index 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 filediff --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.htmldeleted file mode 100644index 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 filediff --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.htmldeleted file mode 100644index 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 filediff --git a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.javaindex 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.Codecindex 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.FastCompressingCodecorg.apache.lucene.codecs.compressing.FastDecompressionCompressingCodecorg.apache.lucene.codecs.compressing.HighCompressionCompressingCodecorg.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.Lucene49RWCodecdiff --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.DocValuesFormatindex 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.Lucene42RWDocValuesFormatdiff --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.PostingsFormatindex 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.Lucene41VarGapFixedIntervalorg.apache.lucene.codecs.lucene41vargap.Lucene41VarGapDocFreqIntervalorg.apache.lucene.codecs.bloom.TestBloomFilteredLucene41Postingsorg.apache.lucene.codecs.asserting.AssertingPostingsFormat-org.apache.lucene.codecs.lucene40.Lucene40RWPostingsFormatdiff --git a/solr/common-build.xml b/solr/common-build.xmlindex 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}"/>