Skip to content

Apache Lucene open-source search software

Backcompat index generation: add docs, and point to usage information on the wiki: http://wiki.apache.org/lucene-java/ReleaseTodo#Generate_Backcompat_Indexes

Steven Rowe01a4c9727326
diff --git a/dev-tools/scripts/addBackcompatIndexes.py b/dev-tools/scripts/addBackcompatIndexes.py
index b4dbdcf8f32..9e0963def5f 100644
--- a/dev-tools/scripts/addBackcompatIndexes.py
+++ b/dev-tools/scripts/addBackcompatIndexes.py
@@ -13,6 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+
+# For usage information, see:
+#
+# http://wiki.apache.org/lucene-java/ReleaseTodo#Generate_Backcompat_Indexes
+
+
import os
import sys
sys.path.append(os.path.dirname(__file__))
@@ -182,7 +188,11 @@ def download_release(version, temp_dir, force):
return source
def read_config():
- parser = argparse.ArgumentParser(description='Add backcompat index and test for new version')
+ parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
+ description='''\
+Add backcompat index and test for new version. See:
+http://wiki.apache.org/lucene-java/ReleaseTodo#Generate_Backcompat_Indexes
+''')
parser.add_argument('--force', action='store_true', default=False,
help='Redownload the version and rebuild, even if it already exists')
parser.add_argument('--no-cleanup', dest='cleanup', action='store_false', default=True,
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index d27aebb3716..5169b36f762 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -77,11 +77,21 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
/*
- Verify we can read the pre-5.0 file format, do searches
- against it, and add documents to it.
+ Verify we can read previous versions' indexes, do searches
+ against them, and add documents to them.
*/
public class TestBackwardsCompatibility extends LuceneTestCase {
+ // Backcompat index generation, described below, is mostly automated in:
+ //
+ // dev-tools/scripts/addBackCompatIndexes.py
+ //
+ // For usage information, see:
+ //
+ // http://wiki.apache.org/lucene-java/ReleaseTodo#Generate_Backcompat_Indexes
+ //
+ // -----
+ //
// To generate backcompat indexes with the current default codec, run the following ant command:
// ant test -Dtestcase=TestBackwardsCompatibility -Dtests.bwcdir=/path/to/store/indexes
// -Dtests.codec=default -Dtests.useSecurityManager=false