diff --git a/src/main/java/org/elasticsearch/Version.java b/src/main/java/org/elasticsearch/Version.java index 6378b8b0881..7c17a302d63 100644 --- a/src/main/java/org/elasticsearch/Version.java +++ b/src/main/java/org/elasticsearch/Version.java @@ -198,8 +198,8 @@ public class Version implements Serializable { public static final Version V_1_3_2 = new Version(V_1_3_2_ID, false, org.apache.lucene.util.Version.LUCENE_4_9); public static final int V_1_3_3_ID = /*00*/1030399; public static final Version V_1_3_3 = new Version(V_1_3_3_ID, false, org.apache.lucene.util.Version.LUCENE_4_9); - public static final int V_1_4_0_Beta_ID = /*00*/1040001; - public static final Version V_1_4_0_Beta = new Version(V_1_4_0_Beta_ID, false, org.apache.lucene.util.Version.LUCENE_4_10_0); + public static final int V_1_4_0_Beta1_ID = /*00*/1040001; + public static final Version V_1_4_0_Beta1 = new Version(V_1_4_0_Beta1_ID, false, org.apache.lucene.util.Version.LUCENE_4_10_0); public static final int V_1_4_0_ID = /*00*/1040099; public static final Version V_1_4_0 = new Version(V_1_4_0_ID, false, org.apache.lucene.util.Version.LUCENE_4_10_0); public static final int V_1_5_0_ID = /*00*/1050099; @@ -225,8 +225,8 @@ public class Version implements Serializable { return V_1_5_0; case V_1_4_0_ID: return V_1_4_0; - case V_1_4_0_Beta_ID: - return V_1_4_0_Beta; + case V_1_4_0_Beta1_ID: + return V_1_4_0_Beta1; case V_1_3_3_ID: return V_1_3_3; case V_1_3_2_ID: diff --git a/src/main/java/org/elasticsearch/action/OriginalIndices.java b/src/main/java/org/elasticsearch/action/OriginalIndices.java index 134f3a09218..a5bfd89234f 100644 --- a/src/main/java/org/elasticsearch/action/OriginalIndices.java +++ b/src/main/java/org/elasticsearch/action/OriginalIndices.java @@ -62,7 +62,7 @@ public class OriginalIndices implements IndicesRequest { } public static OriginalIndices readOptionalOriginalIndices(StreamInput in) throws IOException { - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { boolean empty = in.readBoolean(); if (!empty) { return new OriginalIndices(in.readStringArray(), IndicesOptions.readIndicesOptions(in)); @@ -72,7 +72,7 @@ public class OriginalIndices implements IndicesRequest { } public static void writeOptionalOriginalIndices(OriginalIndices originalIndices, StreamOutput out) throws IOException { - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { boolean empty = originalIndices == EMPTY; out.writeBoolean(empty); if (!empty) { @@ -83,7 +83,7 @@ public class OriginalIndices implements IndicesRequest { } public static OriginalIndices readOriginalIndices(StreamInput in) throws IOException { - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { return new OriginalIndices(in.readStringArray(), IndicesOptions.readIndicesOptions(in)); } return OriginalIndices.EMPTY; @@ -91,7 +91,7 @@ public class OriginalIndices implements IndicesRequest { public static void writeOriginalIndices(OriginalIndices originalIndices, StreamOutput out) throws IOException { - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeStringArrayNullable(originalIndices.indices); originalIndices.indicesOptions.writeIndicesOptions(out); } diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java index e4a5f0cacad..cab04b72220 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java @@ -218,7 +218,7 @@ public class NodeStats extends NodeOperationResponse implements ToXContent { if (in.readBoolean()) { http = HttpStats.readHttpStats(in); } - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { breaker = AllCircuitBreakerStats.readOptionalAllCircuitBreakerStats(in); } else { // If 1.3.0 or earlier, only a single CircuitBreakerStats can be read @@ -290,7 +290,7 @@ public class NodeStats extends NodeOperationResponse implements ToXContent { out.writeBoolean(true); http.writeTo(out); } - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeOptionalStreamable(breaker); } else { // Writing to a 1.3.0 or earlier stream expects only a single breaker stats diff --git a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java index 8f2967ef0e2..88613315fcf 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequest.java @@ -118,7 +118,7 @@ public class ClearIndicesCacheRequest extends BroadcastOperationRequest { super.writeTo(out); out.writeBoolean(full); out.writeBoolean(force); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeBoolean(waitIfOngoing); } } @@ -117,7 +117,7 @@ public class FlushRequest extends BroadcastOperationRequest { super.readFrom(in); full = in.readBoolean(); force = in.readBoolean(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { waitIfOngoing = in.readBoolean(); } else { waitIfOngoing = false; diff --git a/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java b/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java index c34af1f0574..f0fb3320b48 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/flush/ShardFlushRequest.java @@ -63,7 +63,7 @@ class ShardFlushRequest extends BroadcastShardOperationRequest { super.readFrom(in); full = in.readBoolean(); force = in.readBoolean(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { waitIfOngoing = in.readBoolean(); } else { waitIfOngoing = false; @@ -75,7 +75,7 @@ class ShardFlushRequest extends BroadcastShardOperationRequest { super.writeTo(out); out.writeBoolean(full); out.writeBoolean(force); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeBoolean(waitIfOngoing); } } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStats.java b/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStats.java index fdb7713b163..34ef118ab88 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStats.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/stats/CommonStats.java @@ -537,7 +537,7 @@ public class CommonStats implements Streamable, ToXContent { if (in.getVersion().onOrAfter(Version.V_1_2_0)) { suggest = in.readOptionalStreamable(new SuggestStats()); } - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { queryCache = in.readOptionalStreamable(new QueryCacheStats()); } } @@ -638,7 +638,7 @@ public class CommonStats implements Streamable, ToXContent { if (out.getVersion().onOrAfter(Version.V_1_2_0)) { out.writeOptionalStreamable(suggest); } - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeOptionalStreamable(queryCache); } } diff --git a/src/main/java/org/elasticsearch/action/admin/indices/warmer/get/GetWarmersResponse.java b/src/main/java/org/elasticsearch/action/admin/indices/warmer/get/GetWarmersResponse.java index b8977eba2e3..03cf7e153d0 100644 --- a/src/main/java/org/elasticsearch/action/admin/indices/warmer/get/GetWarmersResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/indices/warmer/get/GetWarmersResponse.java @@ -69,7 +69,7 @@ public class GetWarmersResponse extends ActionResponse { String[] types = in.readStringArray(); BytesReference source = in.readBytesReference(); Boolean queryCache = null; - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { queryCache = in.readOptionalBoolean(); } warmerEntryBuilder.add(new IndexWarmersMetaData.Entry( @@ -95,7 +95,7 @@ public class GetWarmersResponse extends ActionResponse { out.writeString(warmerEntry.name()); out.writeStringArray(warmerEntry.types()); out.writeBytesReference(warmerEntry.source()); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeOptionalBoolean(warmerEntry.queryCache()); } } diff --git a/src/main/java/org/elasticsearch/action/count/CountRequest.java b/src/main/java/org/elasticsearch/action/count/CountRequest.java index 2db49dd30d6..c755788b09d 100644 --- a/src/main/java/org/elasticsearch/action/count/CountRequest.java +++ b/src/main/java/org/elasticsearch/action/count/CountRequest.java @@ -251,7 +251,7 @@ public class CountRequest extends BroadcastOperationRequest { source = in.readBytesReference(); types = in.readStringArray(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { terminateAfter = in.readVInt(); } } @@ -265,7 +265,7 @@ public class CountRequest extends BroadcastOperationRequest { out.writeBytesReference(source); out.writeStringArray(types); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeVInt(terminateAfter); } } diff --git a/src/main/java/org/elasticsearch/action/count/CountResponse.java b/src/main/java/org/elasticsearch/action/count/CountResponse.java index 8679d0174c5..1ccdf79aaa8 100644 --- a/src/main/java/org/elasticsearch/action/count/CountResponse.java +++ b/src/main/java/org/elasticsearch/action/count/CountResponse.java @@ -86,7 +86,7 @@ public class CountResponse extends BroadcastOperationResponse { public void readFrom(StreamInput in) throws IOException { super.readFrom(in); count = in.readVLong(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { terminatedEarly = in.readBoolean(); } } @@ -95,7 +95,7 @@ public class CountResponse extends BroadcastOperationResponse { public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVLong(count); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeBoolean(terminatedEarly); } } diff --git a/src/main/java/org/elasticsearch/action/count/ShardCountRequest.java b/src/main/java/org/elasticsearch/action/count/ShardCountRequest.java index db2b7be7876..224f7abd097 100644 --- a/src/main/java/org/elasticsearch/action/count/ShardCountRequest.java +++ b/src/main/java/org/elasticsearch/action/count/ShardCountRequest.java @@ -110,7 +110,7 @@ class ShardCountRequest extends BroadcastShardOperationRequest { } nowInMillis = in.readVLong(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { terminateAfter = in.readVInt(); } else { terminateAfter = DEFAULT_TERMINATE_AFTER; @@ -138,7 +138,7 @@ class ShardCountRequest extends BroadcastShardOperationRequest { } out.writeVLong(nowInMillis); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeVInt(terminateAfter); } } diff --git a/src/main/java/org/elasticsearch/action/count/ShardCountResponse.java b/src/main/java/org/elasticsearch/action/count/ShardCountResponse.java index 348a5f2819e..770f5d13424 100644 --- a/src/main/java/org/elasticsearch/action/count/ShardCountResponse.java +++ b/src/main/java/org/elasticsearch/action/count/ShardCountResponse.java @@ -59,7 +59,7 @@ class ShardCountResponse extends BroadcastShardOperationResponse { public void readFrom(StreamInput in) throws IOException { super.readFrom(in); count = in.readVLong(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { terminatedEarly = in.readBoolean(); } } @@ -68,7 +68,7 @@ class ShardCountResponse extends BroadcastShardOperationResponse { public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVLong(count); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeBoolean(terminatedEarly); } } diff --git a/src/main/java/org/elasticsearch/action/delete/ShardDeleteRequest.java b/src/main/java/org/elasticsearch/action/delete/ShardDeleteRequest.java index c87aa1d9017..915a4fac07c 100644 --- a/src/main/java/org/elasticsearch/action/delete/ShardDeleteRequest.java +++ b/src/main/java/org/elasticsearch/action/delete/ShardDeleteRequest.java @@ -108,7 +108,7 @@ public class ShardDeleteRequest extends ShardReplicationOperationRequest { } else if (realtime == 1) { this.realtime = true; } - if(in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if(in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.ignoreErrorsOnGeneratedFields = in.readBoolean(); } @@ -339,7 +339,7 @@ public class GetRequest extends SingleShardOperationRequest { } else { out.writeByte((byte) 1); } - if(out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if(out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeBoolean(ignoreErrorsOnGeneratedFields); } out.writeByte(versionType.getValue()); diff --git a/src/main/java/org/elasticsearch/action/get/MultiGetRequest.java b/src/main/java/org/elasticsearch/action/get/MultiGetRequest.java index c648318b750..7300b9c788a 100644 --- a/src/main/java/org/elasticsearch/action/get/MultiGetRequest.java +++ b/src/main/java/org/elasticsearch/action/get/MultiGetRequest.java @@ -513,7 +513,7 @@ public class MultiGetRequest extends ActionRequest implements I } else if (realtime == 1) { this.realtime = true; } - if(in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if(in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { ignoreErrorsOnGeneratedFields = in.readBoolean(); } @@ -536,7 +536,7 @@ public class MultiGetRequest extends ActionRequest implements I } else { out.writeByte((byte) 1); } - if(out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if(out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeBoolean(ignoreErrorsOnGeneratedFields); } diff --git a/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java b/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java index 4e742af5ffc..6121fb54951 100644 --- a/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java +++ b/src/main/java/org/elasticsearch/action/get/MultiGetShardRequest.java @@ -121,7 +121,7 @@ public class MultiGetShardRequest extends SingleShardOperationRequest(size); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { for (int i = 0; i < size; i++) { locations.add(in.readVInt()); items.add(MultiGetRequest.Item.readItem(in)); @@ -175,7 +175,7 @@ public class MultiGetShardRequest extends SingleShardOperationRequest impl } searchType = SearchType.fromId(in.readByte()); - if (in.getVersion().before(Version.V_1_4_0_Beta)) { + if (in.getVersion().before(Version.V_1_4_0_Beta1)) { //searchQueryHint was unused and removed in 1.4 if (in.readBoolean()) { in.readString(); @@ -676,7 +676,7 @@ public class MoreLikeThisRequest extends ActionRequest impl } out.writeByte(searchType.id()); - if (out.getVersion().before(Version.V_1_4_0_Beta)) { + if (out.getVersion().before(Version.V_1_4_0_Beta1)) { //searchQueryHint was unused and removed in 1.4 out.writeBoolean(false); } diff --git a/src/main/java/org/elasticsearch/action/search/SearchRequest.java b/src/main/java/org/elasticsearch/action/search/SearchRequest.java index d2ee880c18a..2d6247d57fc 100644 --- a/src/main/java/org/elasticsearch/action/search/SearchRequest.java +++ b/src/main/java/org/elasticsearch/action/search/SearchRequest.java @@ -582,7 +582,7 @@ public class SearchRequest extends ActionRequest implements Indic } } - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { queryCache = in.readOptionalBoolean(); } } @@ -627,7 +627,7 @@ public class SearchRequest extends ActionRequest implements Indic } } - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeOptionalBoolean(queryCache); } } diff --git a/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java b/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java index cfe86bdcd70..86937064b4c 100644 --- a/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java +++ b/src/main/java/org/elasticsearch/action/support/replication/TransportShardReplicationOperationAction.java @@ -283,14 +283,14 @@ public abstract class TransportShardReplicationOperationAction= 0; //older nodes will send the concrete index as part of the request shardId = new ShardId(request.index(), shard); @@ -300,7 +300,7 @@ public abstract class TransportShardReplicationOperationAction docAsUpsert = in.readBoolean(); version = Versions.readVersion(in); versionType = VersionType.fromValue(in.readByte()); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { detectNoop = in.readBoolean(); scriptedUpsert = in.readBoolean(); } @@ -725,7 +725,7 @@ public class UpdateRequest extends InstanceShardOperationRequest out.writeBoolean(docAsUpsert); Versions.writeVersion(version, out); out.writeByte(versionType.getValue()); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeBoolean(detectNoop); out.writeBoolean(scriptedUpsert); } diff --git a/src/main/java/org/elasticsearch/cluster/metadata/MappingMetaData.java b/src/main/java/org/elasticsearch/cluster/metadata/MappingMetaData.java index 5eca42b17c5..c06c9a7185e 100644 --- a/src/main/java/org/elasticsearch/cluster/metadata/MappingMetaData.java +++ b/src/main/java/org/elasticsearch/cluster/metadata/MappingMetaData.java @@ -546,7 +546,7 @@ public class MappingMetaData { out.writeBoolean(false); } out.writeString(mappingMd.timestamp().format()); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { if (mappingMd.timestamp().hasDefaultTimestamp()) { out.writeBoolean(true); out.writeString(mappingMd.timestamp().defaultTimestamp()); @@ -592,7 +592,7 @@ public class MappingMetaData { Routing routing = new Routing(in.readBoolean(), in.readBoolean() ? in.readString() : null); // timestamp Timestamp timestamp = new Timestamp(in.readBoolean(), in.readBoolean() ? in.readString() : null, in.readString(), - in.getVersion().onOrAfter(Version.V_1_4_0_Beta) ? (in.readBoolean() ? in.readString() : null) : TimestampFieldMapper.Defaults.DEFAULT_TIMESTAMP); + in.getVersion().onOrAfter(Version.V_1_4_0_Beta1) ? (in.readBoolean() ? in.readString() : null) : TimestampFieldMapper.Defaults.DEFAULT_TIMESTAMP); final boolean hasParentField = in.readBoolean(); return new MappingMetaData(type, source, id, routing, timestamp, hasParentField); } diff --git a/src/main/java/org/elasticsearch/common/lucene/Lucene.java b/src/main/java/org/elasticsearch/common/lucene/Lucene.java index 870f4c99299..5998f3b9c71 100644 --- a/src/main/java/org/elasticsearch/common/lucene/Lucene.java +++ b/src/main/java/org/elasticsearch/common/lucene/Lucene.java @@ -423,7 +423,7 @@ public class Lucene { public static Explanation readExplanation(StreamInput in) throws IOException { Explanation explanation; - if (in.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta) && in.readBoolean()) { + if (in.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta1) && in.readBoolean()) { Boolean match = in.readOptionalBoolean(); explanation = new ComplexExplanation(); ((ComplexExplanation) explanation).setMatch(match); @@ -444,7 +444,7 @@ public class Lucene { public static void writeExplanation(StreamOutput out, Explanation explanation) throws IOException { - if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta1)) { if (explanation instanceof ComplexExplanation) { out.writeBoolean(true); out.writeOptionalBoolean(((ComplexExplanation) explanation).getMatch()); diff --git a/src/main/java/org/elasticsearch/common/rounding/Rounding.java b/src/main/java/org/elasticsearch/common/rounding/Rounding.java index 083ccf0e24a..87352123728 100644 --- a/src/main/java/org/elasticsearch/common/rounding/Rounding.java +++ b/src/main/java/org/elasticsearch/common/rounding/Rounding.java @@ -219,7 +219,7 @@ public abstract class Rounding implements Streamable { @Override public void readFrom(StreamInput in) throws IOException { rounding = Rounding.Streams.read(in); - if (in.getVersion().before(Version.V_1_4_0_Beta)) { + if (in.getVersion().before(Version.V_1_4_0_Beta1)) { preOffset = in.readVLong(); postOffset = in.readVLong(); } else { @@ -231,7 +231,7 @@ public abstract class Rounding implements Streamable { @Override public void writeTo(StreamOutput out) throws IOException { Rounding.Streams.write(rounding, out); - if (out.getVersion().before(Version.V_1_4_0_Beta)) { + if (out.getVersion().before(Version.V_1_4_0_Beta1)) { out.writeVLong(preOffset); out.writeVLong(postOffset); } else { diff --git a/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java b/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java index ce962d0c120..1765f022529 100644 --- a/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java +++ b/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java @@ -394,7 +394,7 @@ public class MasterFaultDetection extends FaultDetection { super.readFrom(in); nodeId = in.readString(); masterNodeId = in.readString(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { clusterName = ClusterName.readClusterName(in); } } @@ -404,7 +404,7 @@ public class MasterFaultDetection extends FaultDetection { super.writeTo(out); out.writeString(nodeId); out.writeString(masterNodeId); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { clusterName.writeTo(out); } } diff --git a/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java b/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java index edb76971a26..47f800b0e53 100644 --- a/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java +++ b/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java @@ -335,7 +335,7 @@ public class NodesFaultDetection extends FaultDetection { public void readFrom(StreamInput in) throws IOException { super.readFrom(in); nodeId = in.readString(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { clusterName = ClusterName.readClusterName(in); masterNode = DiscoveryNode.readNode(in); clusterStateVersion = in.readLong(); @@ -346,7 +346,7 @@ public class NodesFaultDetection extends FaultDetection { public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(nodeId); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { clusterName.writeTo(out); masterNode.writeTo(out); out.writeLong(clusterStateVersion); diff --git a/src/main/java/org/elasticsearch/discovery/zen/membership/MembershipAction.java b/src/main/java/org/elasticsearch/discovery/zen/membership/MembershipAction.java index de3b8a6be46..e0360e2bc31 100644 --- a/src/main/java/org/elasticsearch/discovery/zen/membership/MembershipAction.java +++ b/src/main/java/org/elasticsearch/discovery/zen/membership/MembershipAction.java @@ -126,7 +126,7 @@ public class MembershipAction extends AbstractComponent { public void readFrom(StreamInput in) throws IOException { super.readFrom(in); node = DiscoveryNode.readNode(in); - if (in.getVersion().before(Version.V_1_4_0_Beta)) { + if (in.getVersion().before(Version.V_1_4_0_Beta1)) { withClusterState = in.readBoolean(); } } @@ -135,7 +135,7 @@ public class MembershipAction extends AbstractComponent { public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); node.writeTo(out); - if (out.getVersion().before(Version.V_1_4_0_Beta)) { + if (out.getVersion().before(Version.V_1_4_0_Beta1)) { // old with cluster state flag out.writeBoolean(false); } @@ -219,7 +219,7 @@ public class MembershipAction extends AbstractComponent { @Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); - if (in.getVersion().before(Version.V_1_4_0_Beta)) { + if (in.getVersion().before(Version.V_1_4_0_Beta1)) { // cluster name doesn't matter... ClusterState.Builder.readFrom(in, nodesProvider.nodes().localNode(), null); } @@ -228,7 +228,7 @@ public class MembershipAction extends AbstractComponent { @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); - if (out.getVersion().before(Version.V_1_4_0_Beta)) { + if (out.getVersion().before(Version.V_1_4_0_Beta1)) { ClusterState.Builder.writeTo(clusterService.state(), out); } } diff --git a/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPing.java b/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPing.java index 33dd72e7285..5beddfcf727 100644 --- a/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPing.java +++ b/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPing.java @@ -108,7 +108,7 @@ public interface ZenPing extends LifecycleComponent { if (in.readBoolean()) { master = readNode(in); } - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.hasJoinedOnce = in.readBoolean(); } else { // As of 1.4.0 we prefer to elect nodes which have previously successfully joined the cluster. @@ -130,7 +130,7 @@ public interface ZenPing extends LifecycleComponent { out.writeBoolean(true); master.writeTo(out); } - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeBoolean(hasJoinedOnce); } } diff --git a/src/main/java/org/elasticsearch/index/engine/SegmentsStats.java b/src/main/java/org/elasticsearch/index/engine/SegmentsStats.java index 70b43427051..991c1b67d2f 100644 --- a/src/main/java/org/elasticsearch/index/engine/SegmentsStats.java +++ b/src/main/java/org/elasticsearch/index/engine/SegmentsStats.java @@ -182,10 +182,10 @@ public class SegmentsStats implements Streamable, ToXContent { indexWriterMemoryInBytes = in.readLong(); versionMapMemoryInBytes = in.readLong(); } - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { indexWriterMaxMemoryInBytes = in.readLong(); } - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { fixedBitSetMemoryInBytes = in.readLong(); } } @@ -198,10 +198,10 @@ public class SegmentsStats implements Streamable, ToXContent { out.writeLong(indexWriterMemoryInBytes); out.writeLong(versionMapMemoryInBytes); } - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeLong(indexWriterMaxMemoryInBytes); } - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeLong(fixedBitSetMemoryInBytes); } } diff --git a/src/main/java/org/elasticsearch/index/fielddata/plain/DocValuesIndexFieldData.java b/src/main/java/org/elasticsearch/index/fielddata/plain/DocValuesIndexFieldData.java index d216a9a28a8..16dc0eb6267 100644 --- a/src/main/java/org/elasticsearch/index/fielddata/plain/DocValuesIndexFieldData.java +++ b/src/main/java/org/elasticsearch/index/fielddata/plain/DocValuesIndexFieldData.java @@ -108,7 +108,7 @@ public abstract class DocValuesIndexFieldData { assert !numericType.isFloatingPoint(); return new NumericDVIndexFieldData(index, fieldNames, mapper.fieldDataType()); } else if (numericType != null) { - if (Version.indexCreated(indexSettings).onOrAfter(Version.V_1_4_0_Beta)) { + if (Version.indexCreated(indexSettings).onOrAfter(Version.V_1_4_0_Beta1)) { return new SortedNumericDVIndexFieldData(index, fieldNames, numericType, mapper.fieldDataType()); } else { // prior to ES 1.4: multi-valued numerics were boxed inside a byte[] as BINARY diff --git a/src/main/java/org/elasticsearch/index/indexing/IndexingStats.java b/src/main/java/org/elasticsearch/index/indexing/IndexingStats.java index 7353b5e4e43..fbe68ba23db 100644 --- a/src/main/java/org/elasticsearch/index/indexing/IndexingStats.java +++ b/src/main/java/org/elasticsearch/index/indexing/IndexingStats.java @@ -127,7 +127,7 @@ public class IndexingStats implements Streamable, ToXContent { deleteTimeInMillis = in.readVLong(); deleteCurrent = in.readVLong(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { noopUpdateCount = in.readVLong(); } } @@ -142,7 +142,7 @@ public class IndexingStats implements Streamable, ToXContent { out.writeVLong(deleteTimeInMillis); out.writeVLong(deleteCurrent); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeVLong(noopUpdateCount); } } diff --git a/src/main/java/org/elasticsearch/index/mapper/core/NumberFieldMapper.java b/src/main/java/org/elasticsearch/index/mapper/core/NumberFieldMapper.java index 3828cd48cc1..743741cc605 100644 --- a/src/main/java/org/elasticsearch/index/mapper/core/NumberFieldMapper.java +++ b/src/main/java/org/elasticsearch/index/mapper/core/NumberFieldMapper.java @@ -200,7 +200,7 @@ public abstract class NumberFieldMapper extends AbstractFieldM this.ignoreMalformed = ignoreMalformed; this.coerce = coerce; Version v = Version.indexCreated(indexSettings); - this.useSortedNumericDocValues = v.onOrAfter(Version.V_1_4_0_Beta); + this.useSortedNumericDocValues = v.onOrAfter(Version.V_1_4_0_Beta1); } @Override diff --git a/src/main/java/org/elasticsearch/index/query/QueryParseContext.java b/src/main/java/org/elasticsearch/index/query/QueryParseContext.java index 764da0d78c7..bea147f2929 100644 --- a/src/main/java/org/elasticsearch/index/query/QueryParseContext.java +++ b/src/main/java/org/elasticsearch/index/query/QueryParseContext.java @@ -352,7 +352,7 @@ public class QueryParseContext { return fieldMapping; } else { Version indexCreatedVersion = indexQueryParser.getIndexCreatedVersion(); - if (fieldMapping == null && indexCreatedVersion.onOrAfter(Version.V_1_4_0_Beta)) { + if (fieldMapping == null && indexCreatedVersion.onOrAfter(Version.V_1_4_0_Beta1)) { throw new QueryParsingException(index, "Strict field resolution and no field mapping can be found for the field with name [" + name + "]"); } else { return fieldMapping; diff --git a/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java b/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java index 142b79800a2..ec47fad91a2 100644 --- a/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java +++ b/src/main/java/org/elasticsearch/index/store/StoreFileMetaData.java @@ -124,7 +124,7 @@ public class StoreFileMetaData implements Streamable { String versionString = in.readOptionalString(); writtenBy = Lucene.parseVersionLenient(versionString, null); } - if (in.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta1)) { hash = in.readBytesRef(); } else { hash = new BytesRef(); @@ -139,7 +139,7 @@ public class StoreFileMetaData implements Streamable { if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_0)) { out.writeOptionalString(writtenBy == null ? null : writtenBy.toString()); } - if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_4_0_Beta1)) { out.writeBytesRef(hash); } } diff --git a/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerStats.java b/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerStats.java index 32242d17195..d70e3a9658a 100644 --- a/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerStats.java +++ b/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerStats.java @@ -91,7 +91,7 @@ public class CircuitBreakerStats implements Streamable, ToXContent { } else { this.trippedCount = -1; } - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.name = CircuitBreaker.Name.readFrom(in); } else { this.name = CircuitBreaker.Name.FIELDDATA; @@ -106,7 +106,7 @@ public class CircuitBreakerStats implements Streamable, ToXContent { if (out.getVersion().onOrAfter(Version.V_1_2_0)) { out.writeLong(trippedCount); } - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { CircuitBreaker.Name.writeTo(name, out); } } diff --git a/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java b/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java index 4f499bbaf65..1b4ea8130ac 100644 --- a/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java +++ b/src/main/java/org/elasticsearch/indices/recovery/RecoveryTranslogOperationsRequest.java @@ -69,7 +69,7 @@ class RecoveryTranslogOperationsRequest extends TransportRequest { int size = in.readVInt(); operations = Lists.newArrayListWithExpectedSize(size); for (int i = 0; i < size; i++) { - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { operations.add(TranslogStreams.CHECKSUMMED_TRANSLOG_STREAM.read(in)); } else { operations.add(TranslogStreams.LEGACY_TRANSLOG_STREAM.read(in)); @@ -85,7 +85,7 @@ class RecoveryTranslogOperationsRequest extends TransportRequest { shardId.writeTo(out); out.writeVInt(operations.size()); for (Translog.Operation operation : operations) { - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { TranslogStreams.CHECKSUMMED_TRANSLOG_STREAM.write(out, operation); } else { TranslogStreams.LEGACY_TRANSLOG_STREAM.write(out, operation); diff --git a/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTerms.java b/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTerms.java index c7c1697a9b3..78fa778589b 100644 --- a/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTerms.java +++ b/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/DoubleTerms.java @@ -116,7 +116,7 @@ public class DoubleTerms extends InternalTerms { @Override public void readFrom(StreamInput in) throws IOException { this.name = in.readString(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.docCountError = in.readLong(); } else { this.docCountError = -1; @@ -124,7 +124,7 @@ public class DoubleTerms extends InternalTerms { this.order = InternalOrder.Streams.readOrder(in); this.formatter = ValueFormatterStreams.readOptional(in); this.requiredSize = readSize(in); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.shardSize = readSize(in); this.showTermDocCountError = in.readBoolean(); } else { @@ -138,7 +138,7 @@ public class DoubleTerms extends InternalTerms { double term = in.readDouble(); long docCount = in.readVLong(); long bucketDocCountError = -1; - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta) && showTermDocCountError) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1) && showTermDocCountError) { bucketDocCountError = in.readLong(); } InternalAggregations aggregations = InternalAggregations.readAggregations(in); @@ -151,13 +151,13 @@ public class DoubleTerms extends InternalTerms { @Override public void writeTo(StreamOutput out) throws IOException { out.writeString(name); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeLong(docCountError); } InternalOrder.Streams.writeOrder(order, out); ValueFormatterStreams.writeOptional(formatter, out); writeSize(requiredSize, out); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { writeSize(shardSize, out); out.writeBoolean(showTermDocCountError); } @@ -166,7 +166,7 @@ public class DoubleTerms extends InternalTerms { for (InternalTerms.Bucket bucket : buckets) { out.writeDouble(((Bucket) bucket).term); out.writeVLong(bucket.getDocCount()); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta) && showTermDocCountError) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1) && showTermDocCountError) { out.writeLong(bucket.docCountError); } ((InternalAggregations) bucket.getAggregations()).writeTo(out); diff --git a/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongTerms.java b/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongTerms.java index 4d3d44bdd24..f7ec921e66a 100644 --- a/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongTerms.java +++ b/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongTerms.java @@ -117,7 +117,7 @@ public class LongTerms extends InternalTerms { @Override public void readFrom(StreamInput in) throws IOException { this.name = in.readString(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.docCountError = in.readLong(); } else { this.docCountError = -1; @@ -125,7 +125,7 @@ public class LongTerms extends InternalTerms { this.order = InternalOrder.Streams.readOrder(in); this.formatter = ValueFormatterStreams.readOptional(in); this.requiredSize = readSize(in); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.shardSize = readSize(in); this.showTermDocCountError = in.readBoolean(); } else { @@ -139,7 +139,7 @@ public class LongTerms extends InternalTerms { long term = in.readLong(); long docCount = in.readVLong(); long bucketDocCountError = -1; - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta) && showTermDocCountError) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1) && showTermDocCountError) { bucketDocCountError = in.readLong(); } InternalAggregations aggregations = InternalAggregations.readAggregations(in); @@ -152,13 +152,13 @@ public class LongTerms extends InternalTerms { @Override public void writeTo(StreamOutput out) throws IOException { out.writeString(name); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeLong(docCountError); } InternalOrder.Streams.writeOrder(order, out); ValueFormatterStreams.writeOptional(formatter, out); writeSize(requiredSize, out); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { writeSize(shardSize, out); out.writeBoolean(showTermDocCountError); } @@ -167,7 +167,7 @@ public class LongTerms extends InternalTerms { for (InternalTerms.Bucket bucket : buckets) { out.writeLong(((Bucket) bucket).term); out.writeVLong(bucket.getDocCount()); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta) && showTermDocCountError) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1) && showTermDocCountError) { out.writeLong(bucket.docCountError); } ((InternalAggregations) bucket.getAggregations()).writeTo(out); diff --git a/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java b/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java index 956c99d75b9..93e385565b6 100644 --- a/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java +++ b/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/StringTerms.java @@ -115,14 +115,14 @@ public class StringTerms extends InternalTerms { @Override public void readFrom(StreamInput in) throws IOException { this.name = in.readString(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.docCountError = in.readLong(); } else { this.docCountError = -1; } this.order = InternalOrder.Streams.readOrder(in); this.requiredSize = readSize(in); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { this.shardSize = readSize(in); this.showTermDocCountError = in.readBoolean(); } else { @@ -136,7 +136,7 @@ public class StringTerms extends InternalTerms { BytesRef termBytes = in.readBytesRef(); long docCount = in.readVLong(); long bucketDocCountError = -1; - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta) && showTermDocCountError) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1) && showTermDocCountError) { bucketDocCountError = in.readLong(); } InternalAggregations aggregations = InternalAggregations.readAggregations(in); @@ -149,12 +149,12 @@ public class StringTerms extends InternalTerms { @Override public void writeTo(StreamOutput out) throws IOException { out.writeString(name); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeLong(docCountError); } InternalOrder.Streams.writeOrder(order, out); writeSize(requiredSize, out); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { writeSize(shardSize, out); out.writeBoolean(showTermDocCountError); } @@ -163,7 +163,7 @@ public class StringTerms extends InternalTerms { for (InternalTerms.Bucket bucket : buckets) { out.writeBytesRef(((Bucket) bucket).termBytes); out.writeVLong(bucket.getDocCount()); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta) && showTermDocCountError) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1) && showTermDocCountError) { out.writeLong(bucket.docCountError); } ((InternalAggregations) bucket.getAggregations()).writeTo(out); diff --git a/src/main/java/org/elasticsearch/search/internal/InternalSearchResponse.java b/src/main/java/org/elasticsearch/search/internal/InternalSearchResponse.java index 57d17e019ad..29db78dfb5f 100644 --- a/src/main/java/org/elasticsearch/search/internal/InternalSearchResponse.java +++ b/src/main/java/org/elasticsearch/search/internal/InternalSearchResponse.java @@ -113,7 +113,7 @@ public class InternalSearchResponse implements Streamable, ToXContent { } timedOut = in.readBoolean(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { terminatedEarly = in.readOptionalBoolean(); } } @@ -135,7 +135,7 @@ public class InternalSearchResponse implements Streamable, ToXContent { } out.writeBoolean(timedOut); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeOptionalBoolean(terminatedEarly); } diff --git a/src/main/java/org/elasticsearch/search/internal/ShardSearchRequest.java b/src/main/java/org/elasticsearch/search/internal/ShardSearchRequest.java index 67b255fdc97..bc0250b389d 100644 --- a/src/main/java/org/elasticsearch/search/internal/ShardSearchRequest.java +++ b/src/main/java/org/elasticsearch/search/internal/ShardSearchRequest.java @@ -273,7 +273,7 @@ public class ShardSearchRequest extends TransportRequest implements IndicesReque useSlowScroll = in.getVersion().before(ParsedScrollId.SCROLL_SEARCH_AFTER_MINIMUM_VERSION); } - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { queryCache = in.readOptionalBoolean(); } originalIndices = OriginalIndices.readOptionalOriginalIndices(in); @@ -322,7 +322,7 @@ public class ShardSearchRequest extends TransportRequest implements IndicesReque out.writeBoolean(useSlowScroll); } - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeOptionalBoolean(queryCache); } OriginalIndices.writeOptionalOriginalIndices(originalIndices, out); diff --git a/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java b/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java index 33b4e7e4d1f..ec0f078df22 100644 --- a/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java +++ b/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java @@ -164,7 +164,7 @@ public class QuerySearchResult extends QuerySearchResultProvider { suggest = Suggest.readSuggest(Suggest.Fields.SUGGEST, in); } searchTimedOut = in.readBoolean(); - if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { terminatedEarly = in.readOptionalBoolean(); } } @@ -194,7 +194,7 @@ public class QuerySearchResult extends QuerySearchResultProvider { suggest.writeTo(out); } out.writeBoolean(searchTimedOut); - if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { + if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) { out.writeOptionalBoolean(terminatedEarly); } } diff --git a/src/main/java/org/elasticsearch/search/suggest/Suggest.java b/src/main/java/org/elasticsearch/search/suggest/Suggest.java index 9e847d5ad77..91925d71e03 100644 --- a/src/main/java/org/elasticsearch/search/suggest/Suggest.java +++ b/src/main/java/org/elasticsearch/search/suggest/Suggest.java @@ -589,7 +589,7 @@ public class Suggest implements Iterable actionsVersions = new HashMap<>(); static { - actionsVersions.put(BenchmarkService.STATUS_ACTION_NAME, Version.V_1_4_0_Beta); - actionsVersions.put(BenchmarkService.START_ACTION_NAME, Version.V_1_4_0_Beta); - actionsVersions.put(BenchmarkService.ABORT_ACTION_NAME, Version.V_1_4_0_Beta); - actionsVersions.put(BenchmarkAction.NAME, Version.V_1_4_0_Beta); - actionsVersions.put(BenchmarkStatusAction.NAME, Version.V_1_4_0_Beta); - actionsVersions.put(AbortBenchmarkAction.NAME, Version.V_1_4_0_Beta); - actionsVersions.put(GetIndexAction.NAME, Version.V_1_4_0_Beta); + actionsVersions.put(BenchmarkService.STATUS_ACTION_NAME, Version.V_1_4_0_Beta1); + actionsVersions.put(BenchmarkService.START_ACTION_NAME, Version.V_1_4_0_Beta1); + actionsVersions.put(BenchmarkService.ABORT_ACTION_NAME, Version.V_1_4_0_Beta1); + actionsVersions.put(BenchmarkAction.NAME, Version.V_1_4_0_Beta1); + actionsVersions.put(BenchmarkStatusAction.NAME, Version.V_1_4_0_Beta1); + actionsVersions.put(AbortBenchmarkAction.NAME, Version.V_1_4_0_Beta1); + actionsVersions.put(GetIndexAction.NAME, Version.V_1_4_0_Beta1); - actionsVersions.put(ExistsAction.NAME, Version.V_1_4_0_Beta); - actionsVersions.put(ExistsAction.NAME + "[s]", Version.V_1_4_0_Beta); + actionsVersions.put(ExistsAction.NAME, Version.V_1_4_0_Beta1); + actionsVersions.put(ExistsAction.NAME + "[s]", Version.V_1_4_0_Beta1); actionsVersions.put(IndicesStore.ACTION_SHARD_EXISTS, Version.V_1_3_0); diff --git a/src/test/java/org/elasticsearch/transport/ActionNamesTests.java b/src/test/java/org/elasticsearch/transport/ActionNamesTests.java index aa3f2d54856..1e8f0f0cf55 100644 --- a/src/test/java/org/elasticsearch/transport/ActionNamesTests.java +++ b/src/test/java/org/elasticsearch/transport/ActionNamesTests.java @@ -83,7 +83,7 @@ public class ActionNamesTests extends ElasticsearchIntegrationTest { Version version = randomVersion(); String outgoingAction = ActionNames.outgoingAction(action, version); - if (version.onOrAfter(Version.V_1_4_0_Beta) || customAction || post_1_4_actions.contains(action)) { + if (version.onOrAfter(Version.V_1_4_0_Beta1) || customAction || post_1_4_actions.contains(action)) { assertThat(outgoingAction, equalTo(action)); } else { assertThat(outgoingAction, not(equalTo(action))); @@ -109,7 +109,7 @@ public class ActionNamesTests extends ElasticsearchIntegrationTest { action = randomAsciiOfLength(randomInt(30)); } while(pre_1_4_names.contains(action)); } else { - if (version.before(Version.V_1_4_0_Beta)) { + if (version.before(Version.V_1_4_0_Beta1)) { action = randomFrom(pre_1_4_names); } else { action = randomFrom(actions); @@ -117,7 +117,7 @@ public class ActionNamesTests extends ElasticsearchIntegrationTest { } String incomingAction = ActionNames.incomingAction (action, version); - if (version.onOrAfter(Version.V_1_4_0_Beta) || customAction) { + if (version.onOrAfter(Version.V_1_4_0_Beta1) || customAction) { assertThat(incomingAction, equalTo(action)); } else { assertThat(incomingAction, not(equalTo(action)));