Upgrade Lucene Version to 4.2. The latest Elasticsearch version must

use the latest Lucene version as specified in o.e.common.lucene.Lucene
and must be upgraded with each lucene release.

This commit adds an assert that fails once the actual lucene version
that is used is higher than the current releases version.
This commit is contained in:
Simon Willnauer 2013-04-30 13:15:29 +02:00
parent 42b9674d0c
commit 8c6ba59b83
1 changed files with 5 additions and 1 deletions

View File

@ -124,9 +124,13 @@ public class Version implements Serializable {
public static final Version V_0_90_1 = new Version(V_0_90_1_ID, false, org.apache.lucene.util.Version.LUCENE_42);
public static final int V_1_0_0_Beta1_ID = /*00*/1000001;
public static final Version V_1_0_0_Beta1 = new Version(V_1_0_0_Beta1_ID, true, org.apache.lucene.util.Version.LUCENE_41);
public static final Version V_1_0_0_Beta1 = new Version(V_1_0_0_Beta1_ID, true, org.apache.lucene.util.Version.LUCENE_42);
public static final Version CURRENT = V_1_0_0_Beta1;
static {
assert CURRENT.luceneVersion == Lucene.VERSION: "Version must be upgraded to [" + Lucene.VERSION + "] is still set to [" + CURRENT.luceneVersion + "]";
}
public static Version readVersion(StreamInput in) throws IOException {
return fromId(in.readVInt());