Skip to content

Commit 80bae21

Browse files
authored
Build: Add 5.0.0-rc1 version (#20721)
This change also fixes the version name for beta1, as it was never updated from alpha6 in master.
1 parent 7b5e651 commit 80bae21

File tree

9 files changed

+18
-16
lines changed

9 files changed

+18
-16
lines changed

core/src/main/java/org/elasticsearch/Version.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ public class Version {
8585
public static final Version V_5_0_0_alpha4 = new Version(V_5_0_0_alpha4_ID, org.apache.lucene.util.Version.LUCENE_6_1_0);
8686
public static final int V_5_0_0_alpha5_ID = 5000005;
8787
public static final Version V_5_0_0_alpha5 = new Version(V_5_0_0_alpha5_ID, org.apache.lucene.util.Version.LUCENE_6_1_0);
88-
public static final int V_5_0_0_alpha6_ID = 5000006;
89-
public static final Version V_5_0_0_alpha6 = new Version(V_5_0_0_alpha6_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
88+
public static final int V_5_0_0_beta1_ID = 5000026;
89+
public static final Version V_5_0_0_beta1 = new Version(V_5_0_0_beta1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
90+
public static final int V_5_0_0_rc1_ID = 5000051;
91+
public static final Version V_5_0_0_rc1 = new Version(V_5_0_0_rc1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
9092
public static final int V_6_0_0_alpha1_ID = 6000001;
9193
public static final Version V_6_0_0_alpha1 = new Version(V_6_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0);
9294
public static final Version CURRENT = V_6_0_0_alpha1;
@@ -104,8 +106,10 @@ public static Version fromId(int id) {
104106
switch (id) {
105107
case V_6_0_0_alpha1_ID:
106108
return V_6_0_0_alpha1;
107-
case V_5_0_0_alpha6_ID:
108-
return V_5_0_0_alpha6;
109+
case V_5_0_0_rc1_ID:
110+
return V_5_0_0_rc1;
111+
case V_5_0_0_beta1_ID:
112+
return V_5_0_0_beta1;
109113
case V_5_0_0_alpha5_ID:
110114
return V_5_0_0_alpha5;
111115
case V_5_0_0_alpha4_ID:

core/src/main/java/org/elasticsearch/cluster/metadata/IndexTemplateMetaData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public IndexTemplateMetaData readFrom(StreamInput in) throws IOException {
222222
IndexMetaData.Custom customIndexMetaData = IndexMetaData.lookupPrototypeSafe(type).readFrom(in);
223223
builder.putCustom(type, customIndexMetaData);
224224
}
225-
if (in.getVersion().onOrAfter(Version.V_5_0_0_alpha6)) {
225+
if (in.getVersion().onOrAfter(Version.V_5_0_0_beta1)) {
226226
builder.version(in.readOptionalVInt());
227227
}
228228
return builder.build();
@@ -248,7 +248,7 @@ public void writeTo(StreamOutput out) throws IOException {
248248
out.writeString(cursor.key);
249249
cursor.value.writeTo(out);
250250
}
251-
if (out.getVersion().onOrAfter(Version.V_5_0_0_alpha6)) {
251+
if (out.getVersion().onOrAfter(Version.V_5_0_0_beta1)) {
252252
out.writeOptionalVInt(version);
253253
}
254254
}

core/src/main/java/org/elasticsearch/index/analysis/AnalysisRegistry.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.elasticsearch.common.util.set.Sets;
3131
import org.elasticsearch.env.Environment;
3232
import org.elasticsearch.index.Index;
33-
import org.elasticsearch.index.IndexService;
3433
import org.elasticsearch.index.IndexSettings;
3534
import org.elasticsearch.index.mapper.TextFieldMapper;
3635
import org.elasticsearch.indices.analysis.AnalysisModule;
@@ -533,7 +532,7 @@ private void processAnalyzerFactory(DeprecationLogger deprecationLogger,
533532
// TODO: remove alias support completely when we no longer support pre 5.0 indices
534533
final String analyzerAliasKey = "index.analysis.analyzer." + analyzerFactory.name() + ".alias";
535534
if (indexSettings.getSettings().get(analyzerAliasKey) != null) {
536-
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_5_0_0_alpha6)) {
535+
if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_5_0_0_beta1)) {
537536
// do not allow alias creation if the index was created on or after v5.0 alpha6
538537
throw new IllegalArgumentException("setting [" + analyzerAliasKey + "] is not supported");
539538
}

core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public class InternalEngine extends Engine {
124124
public InternalEngine(EngineConfig engineConfig) throws EngineException {
125125
super(engineConfig);
126126
openMode = engineConfig.getOpenMode();
127-
if (engineConfig.getIndexSettings().getIndexVersionCreated().before(Version.V_5_0_0_alpha6)) {
127+
if (engineConfig.getIndexSettings().getIndexVersionCreated().before(Version.V_5_0_0_beta1)) {
128128
// no optimization for pre 5.0.0.alpha6 since translog might not have all information needed
129129
maxUnsafeAutoIdTimestamp.set(Long.MAX_VALUE);
130130
} else {

core/src/main/java/org/elasticsearch/index/mapper/FieldMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ protected FieldMapper(String simpleName, MappedFieldType fieldType, MappedFieldT
246246
super(simpleName);
247247
assert indexSettings != null;
248248
this.indexCreatedVersion = Version.indexCreated(indexSettings);
249-
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_alpha6)) {
249+
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_beta1)) {
250250
if (simpleName.isEmpty()) {
251251
throw new IllegalArgumentException("name cannot be empty string");
252252
}

core/src/main/java/org/elasticsearch/index/mapper/LatLonPointFieldMapper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.elasticsearch.index.query.QueryShardException;
3535

3636
import java.io.IOException;
37-
import java.util.Iterator;
3837
import java.util.Map;
3938

4039
/**
@@ -44,7 +43,7 @@
4443
*/
4544
public class LatLonPointFieldMapper extends BaseGeoPointFieldMapper {
4645
public static final String CONTENT_TYPE = "geo_point";
47-
public static final Version LAT_LON_FIELD_VERSION = Version.V_5_0_0_alpha6;
46+
public static final Version LAT_LON_FIELD_VERSION = Version.V_5_0_0_beta1;
4847

4948
public static class Defaults extends BaseGeoPointFieldMapper.Defaults {
5049
public static final LatLonPointFieldType FIELD_TYPE = new LatLonPointFieldType();

core/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ protected static void parseProperties(ObjectMapper.Builder objBuilder, Map<Strin
325325
super(name);
326326
assert settings != null;
327327
Version indexCreatedVersion = Version.indexCreated(settings);
328-
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_alpha6)) {
328+
if (indexCreatedVersion.onOrAfter(Version.V_5_0_0_beta1)) {
329329
if (name.isEmpty()) {
330330
throw new IllegalArgumentException("name cannot be empty string");
331331
}

core/src/test/java/org/elasticsearch/index/query/GeoBoundingBoxQueryBuilderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ protected void doAssertLuceneQuery(GeoBoundingBoxQueryBuilder queryBuilder, Quer
266266
} else {
267267
assertTrue("Found no indexed geo query.", query instanceof LegacyInMemoryGeoBoundingBoxQuery);
268268
}
269-
} else if (context.indexVersionCreated().before(Version.V_5_0_0_alpha6)) {
269+
} else if (context.indexVersionCreated().before(Version.V_5_0_0_beta1)) {
270270
assertTrue("Found no indexed geo query.", query instanceof GeoPointInBBoxQuery);
271271
} else {
272272
assertTrue("Found no indexed geo query.", query instanceof Query);
@@ -431,7 +431,7 @@ private void assertGeoBoundingBoxQuery(String query) throws IOException {
431431
assertThat(filter.topLeft().lon(), closeTo(-70, 1E-5));
432432
assertThat(filter.bottomRight().lat(), closeTo(30, 1E-5));
433433
assertThat(filter.bottomRight().lon(), closeTo(-80, 1E-5));
434-
} else if (shardContext.indexVersionCreated().before(Version.V_5_0_0_alpha6)) {
434+
} else if (shardContext.indexVersionCreated().before(Version.V_5_0_0_beta1)) {
435435
GeoPointInBBoxQuery q = (GeoPointInBBoxQuery) parsedQuery;
436436
assertThat(q.getField(), equalTo(GEO_POINT_FIELD_NAME));
437437
assertThat(q.getMaxLat(), closeTo(40, 1E-5));

core/src/test/java/org/elasticsearch/indices/analysis/AnalysisModuleTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public void testAnalyzerAliasNotAllowedPost5x() throws IOException {
193193
.put("index.analysis.analyzer.foobar.type", "standard")
194194
.put("index.analysis.analyzer.foobar.alias","foobaz")
195195
// analyzer aliases were removed in v5.0.0 alpha6
196-
.put(IndexMetaData.SETTING_VERSION_CREATED, VersionUtils.randomVersionBetween(random(), Version.V_5_0_0_alpha6, null))
196+
.put(IndexMetaData.SETTING_VERSION_CREATED, VersionUtils.randomVersionBetween(random(), Version.V_5_0_0_beta1, null))
197197
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir().toString())
198198
.build();
199199
AnalysisRegistry registry = getNewRegistry(settings);

0 commit comments

Comments
 (0)