[VERSION] s/V_1_4_0_Beta/V_1_4_0_Beta1/g

This commit is contained in:
Simon Willnauer 2014-09-16 10:54:41 +02:00
parent a7dde8dd80
commit 723a40ef34
55 changed files with 142 additions and 142 deletions

View File

@ -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 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 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 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 int V_1_4_0_Beta1_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 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 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 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; 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; return V_1_5_0;
case V_1_4_0_ID: case V_1_4_0_ID:
return V_1_4_0; return V_1_4_0;
case V_1_4_0_Beta_ID: case V_1_4_0_Beta1_ID:
return V_1_4_0_Beta; return V_1_4_0_Beta1;
case V_1_3_3_ID: case V_1_3_3_ID:
return V_1_3_3; return V_1_3_3;
case V_1_3_2_ID: case V_1_3_2_ID:

View File

@ -62,7 +62,7 @@ public class OriginalIndices implements IndicesRequest {
} }
public static OriginalIndices readOptionalOriginalIndices(StreamInput in) throws IOException { 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(); boolean empty = in.readBoolean();
if (!empty) { if (!empty) {
return new OriginalIndices(in.readStringArray(), IndicesOptions.readIndicesOptions(in)); 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 { 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; boolean empty = originalIndices == EMPTY;
out.writeBoolean(empty); out.writeBoolean(empty);
if (!empty) { if (!empty) {
@ -83,7 +83,7 @@ public class OriginalIndices implements IndicesRequest {
} }
public static OriginalIndices readOriginalIndices(StreamInput in) throws IOException { 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 new OriginalIndices(in.readStringArray(), IndicesOptions.readIndicesOptions(in));
} }
return OriginalIndices.EMPTY; return OriginalIndices.EMPTY;
@ -91,7 +91,7 @@ public class OriginalIndices implements IndicesRequest {
public static void writeOriginalIndices(OriginalIndices originalIndices, StreamOutput out) throws IOException { 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); out.writeStringArrayNullable(originalIndices.indices);
originalIndices.indicesOptions.writeIndicesOptions(out); originalIndices.indicesOptions.writeIndicesOptions(out);
} }

View File

@ -218,7 +218,7 @@ public class NodeStats extends NodeOperationResponse implements ToXContent {
if (in.readBoolean()) { if (in.readBoolean()) {
http = HttpStats.readHttpStats(in); 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); breaker = AllCircuitBreakerStats.readOptionalAllCircuitBreakerStats(in);
} else { } else {
// If 1.3.0 or earlier, only a single CircuitBreakerStats can be read // 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); out.writeBoolean(true);
http.writeTo(out); 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); out.writeOptionalStreamable(breaker);
} else { } else {
// Writing to a 1.3.0 or earlier stream expects only a single breaker stats // Writing to a 1.3.0 or earlier stream expects only a single breaker stats

View File

@ -118,7 +118,7 @@ public class ClearIndicesCacheRequest extends BroadcastOperationRequest<ClearInd
recycler = in.readBoolean(); recycler = in.readBoolean();
fields = in.readStringArray(); fields = in.readStringArray();
filterKeys = in.readStringArray(); filterKeys = in.readStringArray();
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
queryCache = in.readBoolean(); queryCache = in.readBoolean();
} }
} }
@ -131,7 +131,7 @@ public class ClearIndicesCacheRequest extends BroadcastOperationRequest<ClearInd
out.writeBoolean(recycler); out.writeBoolean(recycler);
out.writeStringArrayNullable(fields); out.writeStringArrayNullable(fields);
out.writeStringArrayNullable(filterKeys); out.writeStringArrayNullable(filterKeys);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
out.writeBoolean(queryCache); out.writeBoolean(queryCache);
} }
} }

View File

@ -97,7 +97,7 @@ class ShardClearIndicesCacheRequest extends BroadcastShardOperationRequest {
recycler = in.readBoolean(); recycler = in.readBoolean();
fields = in.readStringArray(); fields = in.readStringArray();
filterKeys = in.readStringArray(); filterKeys = in.readStringArray();
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
queryCache = in.readBoolean(); queryCache = in.readBoolean();
} }
} }
@ -111,7 +111,7 @@ class ShardClearIndicesCacheRequest extends BroadcastShardOperationRequest {
out.writeBoolean(recycler); out.writeBoolean(recycler);
out.writeStringArrayNullable(fields); out.writeStringArrayNullable(fields);
out.writeStringArrayNullable(filterKeys); out.writeStringArrayNullable(filterKeys);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
out.writeBoolean(queryCache); out.writeBoolean(queryCache);
} }
} }

View File

@ -107,7 +107,7 @@ public class FlushRequest extends BroadcastOperationRequest<FlushRequest> {
super.writeTo(out); super.writeTo(out);
out.writeBoolean(full); out.writeBoolean(full);
out.writeBoolean(force); 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); out.writeBoolean(waitIfOngoing);
} }
} }
@ -117,7 +117,7 @@ public class FlushRequest extends BroadcastOperationRequest<FlushRequest> {
super.readFrom(in); super.readFrom(in);
full = in.readBoolean(); full = in.readBoolean();
force = 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(); waitIfOngoing = in.readBoolean();
} else { } else {
waitIfOngoing = false; waitIfOngoing = false;

View File

@ -63,7 +63,7 @@ class ShardFlushRequest extends BroadcastShardOperationRequest {
super.readFrom(in); super.readFrom(in);
full = in.readBoolean(); full = in.readBoolean();
force = 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(); waitIfOngoing = in.readBoolean();
} else { } else {
waitIfOngoing = false; waitIfOngoing = false;
@ -75,7 +75,7 @@ class ShardFlushRequest extends BroadcastShardOperationRequest {
super.writeTo(out); super.writeTo(out);
out.writeBoolean(full); out.writeBoolean(full);
out.writeBoolean(force); 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); out.writeBoolean(waitIfOngoing);
} }
} }

View File

@ -537,7 +537,7 @@ public class CommonStats implements Streamable, ToXContent {
if (in.getVersion().onOrAfter(Version.V_1_2_0)) { if (in.getVersion().onOrAfter(Version.V_1_2_0)) {
suggest = in.readOptionalStreamable(new SuggestStats()); 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()); queryCache = in.readOptionalStreamable(new QueryCacheStats());
} }
} }
@ -638,7 +638,7 @@ public class CommonStats implements Streamable, ToXContent {
if (out.getVersion().onOrAfter(Version.V_1_2_0)) { if (out.getVersion().onOrAfter(Version.V_1_2_0)) {
out.writeOptionalStreamable(suggest); 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); out.writeOptionalStreamable(queryCache);
} }
} }

View File

@ -69,7 +69,7 @@ public class GetWarmersResponse extends ActionResponse {
String[] types = in.readStringArray(); String[] types = in.readStringArray();
BytesReference source = in.readBytesReference(); BytesReference source = in.readBytesReference();
Boolean queryCache = null; 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(); queryCache = in.readOptionalBoolean();
} }
warmerEntryBuilder.add(new IndexWarmersMetaData.Entry( warmerEntryBuilder.add(new IndexWarmersMetaData.Entry(
@ -95,7 +95,7 @@ public class GetWarmersResponse extends ActionResponse {
out.writeString(warmerEntry.name()); out.writeString(warmerEntry.name());
out.writeStringArray(warmerEntry.types()); out.writeStringArray(warmerEntry.types());
out.writeBytesReference(warmerEntry.source()); 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()); out.writeOptionalBoolean(warmerEntry.queryCache());
} }
} }

View File

@ -251,7 +251,7 @@ public class CountRequest extends BroadcastOperationRequest<CountRequest> {
source = in.readBytesReference(); source = in.readBytesReference();
types = in.readStringArray(); 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(); terminateAfter = in.readVInt();
} }
} }
@ -265,7 +265,7 @@ public class CountRequest extends BroadcastOperationRequest<CountRequest> {
out.writeBytesReference(source); out.writeBytesReference(source);
out.writeStringArray(types); 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); out.writeVInt(terminateAfter);
} }
} }

View File

@ -86,7 +86,7 @@ public class CountResponse extends BroadcastOperationResponse {
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
count = in.readVLong(); 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(); terminatedEarly = in.readBoolean();
} }
} }
@ -95,7 +95,7 @@ public class CountResponse extends BroadcastOperationResponse {
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
out.writeVLong(count); 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); out.writeBoolean(terminatedEarly);
} }
} }

View File

@ -110,7 +110,7 @@ class ShardCountRequest extends BroadcastShardOperationRequest {
} }
nowInMillis = in.readVLong(); 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(); terminateAfter = in.readVInt();
} else { } else {
terminateAfter = DEFAULT_TERMINATE_AFTER; terminateAfter = DEFAULT_TERMINATE_AFTER;
@ -138,7 +138,7 @@ class ShardCountRequest extends BroadcastShardOperationRequest {
} }
out.writeVLong(nowInMillis); 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); out.writeVInt(terminateAfter);
} }
} }

View File

@ -59,7 +59,7 @@ class ShardCountResponse extends BroadcastShardOperationResponse {
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
count = in.readVLong(); 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(); terminatedEarly = in.readBoolean();
} }
} }
@ -68,7 +68,7 @@ class ShardCountResponse extends BroadcastShardOperationResponse {
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
out.writeVLong(count); 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); out.writeBoolean(terminatedEarly);
} }
} }

View File

@ -108,7 +108,7 @@ public class ShardDeleteRequest extends ShardReplicationOperationRequest<ShardDe
id = in.readString(); id = in.readString();
refresh = in.readBoolean(); refresh = in.readBoolean();
version = Versions.readVersion(in); version = Versions.readVersion(in);
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
originalIndex = in.readOptionalString(); originalIndex = in.readOptionalString();
} }
} }
@ -121,7 +121,7 @@ public class ShardDeleteRequest extends ShardReplicationOperationRequest<ShardDe
out.writeString(id); out.writeString(id);
out.writeBoolean(refresh); out.writeBoolean(refresh);
Versions.writeVersion(version, out); Versions.writeVersion(version, out);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
out.writeOptionalString(originalIndex); out.writeOptionalString(originalIndex);
} }
} }

View File

@ -97,7 +97,7 @@ public class ExplainResponse extends ActionResponse {
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
index = in.readString(); index = in.readString();
type = in.readString(); type = in.readString();
id = in.readString(); id = in.readString();
@ -113,7 +113,7 @@ public class ExplainResponse extends ActionResponse {
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
out.writeString(index); out.writeString(index);
out.writeString(type); out.writeString(type);
out.writeString(id); out.writeString(id);

View File

@ -305,7 +305,7 @@ public class GetRequest extends SingleShardOperationRequest<GetRequest> {
} else if (realtime == 1) { } else if (realtime == 1) {
this.realtime = true; 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(); this.ignoreErrorsOnGeneratedFields = in.readBoolean();
} }
@ -339,7 +339,7 @@ public class GetRequest extends SingleShardOperationRequest<GetRequest> {
} else { } else {
out.writeByte((byte) 1); 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.writeBoolean(ignoreErrorsOnGeneratedFields);
} }
out.writeByte(versionType.getValue()); out.writeByte(versionType.getValue());

View File

@ -513,7 +513,7 @@ public class MultiGetRequest extends ActionRequest<MultiGetRequest> implements I
} else if (realtime == 1) { } else if (realtime == 1) {
this.realtime = true; 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(); ignoreErrorsOnGeneratedFields = in.readBoolean();
} }
@ -536,7 +536,7 @@ public class MultiGetRequest extends ActionRequest<MultiGetRequest> implements I
} else { } else {
out.writeByte((byte) 1); 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.writeBoolean(ignoreErrorsOnGeneratedFields);
} }

View File

@ -121,7 +121,7 @@ public class MultiGetShardRequest extends SingleShardOperationRequest<MultiGetSh
locations = new IntArrayList(size); locations = new IntArrayList(size);
items = new ArrayList<>(size); items = new ArrayList<>(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++) { for (int i = 0; i < size; i++) {
locations.add(in.readVInt()); locations.add(in.readVInt());
items.add(MultiGetRequest.Item.readItem(in)); items.add(MultiGetRequest.Item.readItem(in));
@ -175,7 +175,7 @@ public class MultiGetShardRequest extends SingleShardOperationRequest<MultiGetSh
} else if (realtime == 1) { } else if (realtime == 1) {
this.realtime = true; 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(); ignoreErrorsOnGeneratedFields = in.readBoolean();
} }
} }
@ -185,7 +185,7 @@ public class MultiGetShardRequest extends SingleShardOperationRequest<MultiGetSh
super.writeTo(out); super.writeTo(out);
out.writeVInt(locations.size()); out.writeVInt(locations.size());
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
for (int i = 0; i < locations.size(); i++) { for (int i = 0; i < locations.size(); i++) {
out.writeVInt(locations.get(i)); out.writeVInt(locations.get(i));
items.get(i).writeTo(out); items.get(i).writeTo(out);
@ -224,7 +224,7 @@ public class MultiGetShardRequest extends SingleShardOperationRequest<MultiGetSh
} else { } else {
out.writeByte((byte) 1); 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.writeBoolean(ignoreErrorsOnGeneratedFields);
} }

View File

@ -204,7 +204,7 @@ public class GetIndexedScriptRequest extends ActionRequest<GetIndexedScriptReque
@Override @Override
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
if (in.getVersion().before(Version.V_1_4_0_Beta)) { if (in.getVersion().before(Version.V_1_4_0_Beta1)) {
//the index was previously serialized although not needed //the index was previously serialized although not needed
in.readString(); in.readString();
} }
@ -228,7 +228,7 @@ public class GetIndexedScriptRequest extends ActionRequest<GetIndexedScriptReque
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
if (out.getVersion().before(Version.V_1_4_0_Beta)) { if (out.getVersion().before(Version.V_1_4_0_Beta1)) {
//the index was previously serialized although not needed //the index was previously serialized although not needed
out.writeString(ScriptService.SCRIPT_INDEX); out.writeString(ScriptService.SCRIPT_INDEX);
} }

View File

@ -600,7 +600,7 @@ public class MoreLikeThisRequest extends ActionRequest<MoreLikeThisRequest> impl
} }
searchType = SearchType.fromId(in.readByte()); 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 //searchQueryHint was unused and removed in 1.4
if (in.readBoolean()) { if (in.readBoolean()) {
in.readString(); in.readString();
@ -676,7 +676,7 @@ public class MoreLikeThisRequest extends ActionRequest<MoreLikeThisRequest> impl
} }
out.writeByte(searchType.id()); 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 //searchQueryHint was unused and removed in 1.4
out.writeBoolean(false); out.writeBoolean(false);
} }

View File

@ -582,7 +582,7 @@ public class SearchRequest extends ActionRequest<SearchRequest> 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(); queryCache = in.readOptionalBoolean();
} }
} }
@ -627,7 +627,7 @@ public class SearchRequest extends ActionRequest<SearchRequest> 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); out.writeOptionalBoolean(queryCache);
} }
} }

View File

@ -283,14 +283,14 @@ public abstract class TransportShardReplicationOperationAction<Request extends S
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
int shard = -1; int shard = -1;
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
shardId = ShardId.readShardId(in); shardId = ShardId.readShardId(in);
} else { } else {
shard = in.readVInt(); shard = in.readVInt();
} }
request = newReplicaRequestInstance(); request = newReplicaRequestInstance();
request.readFrom(in); request.readFrom(in);
if (in.getVersion().before(Version.V_1_4_0_Beta)) { if (in.getVersion().before(Version.V_1_4_0_Beta1)) {
assert shard >= 0; assert shard >= 0;
//older nodes will send the concrete index as part of the request //older nodes will send the concrete index as part of the request
shardId = new ShardId(request.index(), shard); shardId = new ShardId(request.index(), shard);
@ -300,7 +300,7 @@ public abstract class TransportShardReplicationOperationAction<Request extends S
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
shardId.writeTo(out); shardId.writeTo(out);
} else { } else {
out.writeVInt(shardId.id()); out.writeVInt(shardId.id());

View File

@ -346,7 +346,7 @@ public abstract class TransportSingleCustomOperationAction<Request extends Singl
super.readFrom(in); super.readFrom(in);
request = newRequest(); request = newRequest();
request.readFrom(in); request.readFrom(in);
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
shardId = ShardId.readShardId(in); shardId = ShardId.readShardId(in);
} else { } else {
//older nodes will send the concrete index as part of the request //older nodes will send the concrete index as part of the request
@ -357,12 +357,12 @@ public abstract class TransportSingleCustomOperationAction<Request extends Singl
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
if (out.getVersion().before(Version.V_1_4_0_Beta)) { if (out.getVersion().before(Version.V_1_4_0_Beta1)) {
//older nodes expect the concrete index as part of the request //older nodes expect the concrete index as part of the request
request.index(shardId.getIndex()); request.index(shardId.getIndex());
} }
request.writeTo(out); request.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
shardId.writeTo(out); shardId.writeTo(out);
} else { } else {
out.writeVInt(shardId.id()); out.writeVInt(shardId.id());

View File

@ -338,7 +338,7 @@ public abstract class TransportShardSingleOperationAction<Request extends Single
super.readFrom(in); super.readFrom(in);
request = newRequest(); request = newRequest();
request.readFrom(in); request.readFrom(in);
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
shardId = ShardId.readShardId(in); shardId = ShardId.readShardId(in);
} else { } else {
//older nodes will send the concrete index as part of the request //older nodes will send the concrete index as part of the request
@ -349,12 +349,12 @@ public abstract class TransportShardSingleOperationAction<Request extends Single
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
if (out.getVersion().before(Version.V_1_4_0_Beta)) { if (out.getVersion().before(Version.V_1_4_0_Beta1)) {
//older nodes expect the concrete index as part of the request //older nodes expect the concrete index as part of the request
request.index(shardId.getIndex()); request.index(shardId.getIndex());
} }
request.writeTo(out); request.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
shardId.writeTo(out); shardId.writeTo(out);
} else { } else {
out.writeVInt(shardId.id()); out.writeVInt(shardId.id());

View File

@ -323,14 +323,14 @@ public class TermVectorRequest extends SingleShardOperationRequest<TermVectorReq
@Override @Override
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
if (in.getVersion().before(Version.V_1_4_0_Beta)) { if (in.getVersion().before(Version.V_1_4_0_Beta1)) {
//term vector used to read & write the index twice, here and in the parent class //term vector used to read & write the index twice, here and in the parent class
in.readString(); in.readString();
} }
type = in.readString(); type = in.readString();
id = in.readString(); id = in.readString();
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
if (in.readBoolean()) { if (in.readBoolean()) {
doc = in.readBytesReference(); doc = in.readBytesReference();
} }
@ -357,14 +357,14 @@ public class TermVectorRequest extends SingleShardOperationRequest<TermVectorReq
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
if (out.getVersion().before(Version.V_1_4_0_Beta)) { if (out.getVersion().before(Version.V_1_4_0_Beta1)) {
//term vector used to read & write the index twice, here and in the parent class //term vector used to read & write the index twice, here and in the parent class
out.writeString(index); out.writeString(index);
} }
out.writeString(type); out.writeString(type);
out.writeString(id); out.writeString(id);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
out.writeBoolean(doc != null); out.writeBoolean(doc != null);
if (doc != null) { if (doc != null) {
out.writeBytesReference(doc); out.writeBytesReference(doc);

View File

@ -672,7 +672,7 @@ public class UpdateRequest extends InstanceShardOperationRequest<UpdateRequest>
docAsUpsert = in.readBoolean(); docAsUpsert = in.readBoolean();
version = Versions.readVersion(in); version = Versions.readVersion(in);
versionType = VersionType.fromValue(in.readByte()); 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(); detectNoop = in.readBoolean();
scriptedUpsert = in.readBoolean(); scriptedUpsert = in.readBoolean();
} }
@ -725,7 +725,7 @@ public class UpdateRequest extends InstanceShardOperationRequest<UpdateRequest>
out.writeBoolean(docAsUpsert); out.writeBoolean(docAsUpsert);
Versions.writeVersion(version, out); Versions.writeVersion(version, out);
out.writeByte(versionType.getValue()); 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(detectNoop);
out.writeBoolean(scriptedUpsert); out.writeBoolean(scriptedUpsert);
} }

View File

@ -546,7 +546,7 @@ public class MappingMetaData {
out.writeBoolean(false); out.writeBoolean(false);
} }
out.writeString(mappingMd.timestamp().format()); 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()) { if (mappingMd.timestamp().hasDefaultTimestamp()) {
out.writeBoolean(true); out.writeBoolean(true);
out.writeString(mappingMd.timestamp().defaultTimestamp()); out.writeString(mappingMd.timestamp().defaultTimestamp());
@ -592,7 +592,7 @@ public class MappingMetaData {
Routing routing = new Routing(in.readBoolean(), in.readBoolean() ? in.readString() : null); Routing routing = new Routing(in.readBoolean(), in.readBoolean() ? in.readString() : null);
// timestamp // timestamp
Timestamp timestamp = new Timestamp(in.readBoolean(), in.readBoolean() ? in.readString() : null, in.readString(), 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(); final boolean hasParentField = in.readBoolean();
return new MappingMetaData(type, source, id, routing, timestamp, hasParentField); return new MappingMetaData(type, source, id, routing, timestamp, hasParentField);
} }

View File

@ -423,7 +423,7 @@ public class Lucene {
public static Explanation readExplanation(StreamInput in) throws IOException { public static Explanation readExplanation(StreamInput in) throws IOException {
Explanation explanation; 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(); Boolean match = in.readOptionalBoolean();
explanation = new ComplexExplanation(); explanation = new ComplexExplanation();
((ComplexExplanation) explanation).setMatch(match); ((ComplexExplanation) explanation).setMatch(match);
@ -444,7 +444,7 @@ public class Lucene {
public static void writeExplanation(StreamOutput out, Explanation explanation) throws IOException { 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) { if (explanation instanceof ComplexExplanation) {
out.writeBoolean(true); out.writeBoolean(true);
out.writeOptionalBoolean(((ComplexExplanation) explanation).getMatch()); out.writeOptionalBoolean(((ComplexExplanation) explanation).getMatch());

View File

@ -219,7 +219,7 @@ public abstract class Rounding implements Streamable {
@Override @Override
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
rounding = Rounding.Streams.read(in); 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(); preOffset = in.readVLong();
postOffset = in.readVLong(); postOffset = in.readVLong();
} else { } else {
@ -231,7 +231,7 @@ public abstract class Rounding implements Streamable {
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
Rounding.Streams.write(rounding, out); 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(preOffset);
out.writeVLong(postOffset); out.writeVLong(postOffset);
} else { } else {

View File

@ -394,7 +394,7 @@ public class MasterFaultDetection extends FaultDetection {
super.readFrom(in); super.readFrom(in);
nodeId = in.readString(); nodeId = in.readString();
masterNodeId = 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); clusterName = ClusterName.readClusterName(in);
} }
} }
@ -404,7 +404,7 @@ public class MasterFaultDetection extends FaultDetection {
super.writeTo(out); super.writeTo(out);
out.writeString(nodeId); out.writeString(nodeId);
out.writeString(masterNodeId); 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); clusterName.writeTo(out);
} }
} }

View File

@ -335,7 +335,7 @@ public class NodesFaultDetection extends FaultDetection {
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
nodeId = in.readString(); 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); clusterName = ClusterName.readClusterName(in);
masterNode = DiscoveryNode.readNode(in); masterNode = DiscoveryNode.readNode(in);
clusterStateVersion = in.readLong(); clusterStateVersion = in.readLong();
@ -346,7 +346,7 @@ public class NodesFaultDetection extends FaultDetection {
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
out.writeString(nodeId); 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); clusterName.writeTo(out);
masterNode.writeTo(out); masterNode.writeTo(out);
out.writeLong(clusterStateVersion); out.writeLong(clusterStateVersion);

View File

@ -126,7 +126,7 @@ public class MembershipAction extends AbstractComponent {
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); super.readFrom(in);
node = DiscoveryNode.readNode(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(); withClusterState = in.readBoolean();
} }
} }
@ -135,7 +135,7 @@ public class MembershipAction extends AbstractComponent {
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); super.writeTo(out);
node.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 // old with cluster state flag
out.writeBoolean(false); out.writeBoolean(false);
} }
@ -219,7 +219,7 @@ public class MembershipAction extends AbstractComponent {
@Override @Override
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
super.readFrom(in); 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... // cluster name doesn't matter...
ClusterState.Builder.readFrom(in, nodesProvider.nodes().localNode(), null); ClusterState.Builder.readFrom(in, nodesProvider.nodes().localNode(), null);
} }
@ -228,7 +228,7 @@ public class MembershipAction extends AbstractComponent {
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out); 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); ClusterState.Builder.writeTo(clusterService.state(), out);
} }
} }

View File

@ -108,7 +108,7 @@ public interface ZenPing extends LifecycleComponent<ZenPing> {
if (in.readBoolean()) { if (in.readBoolean()) {
master = readNode(in); 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(); this.hasJoinedOnce = in.readBoolean();
} else { } else {
// As of 1.4.0 we prefer to elect nodes which have previously successfully joined the cluster. // 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<ZenPing> {
out.writeBoolean(true); out.writeBoolean(true);
master.writeTo(out); 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); out.writeBoolean(hasJoinedOnce);
} }
} }

View File

@ -182,10 +182,10 @@ public class SegmentsStats implements Streamable, ToXContent {
indexWriterMemoryInBytes = in.readLong(); indexWriterMemoryInBytes = in.readLong();
versionMapMemoryInBytes = 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(); 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(); fixedBitSetMemoryInBytes = in.readLong();
} }
} }
@ -198,10 +198,10 @@ public class SegmentsStats implements Streamable, ToXContent {
out.writeLong(indexWriterMemoryInBytes); out.writeLong(indexWriterMemoryInBytes);
out.writeLong(versionMapMemoryInBytes); 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); 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); out.writeLong(fixedBitSetMemoryInBytes);
} }
} }

View File

@ -108,7 +108,7 @@ public abstract class DocValuesIndexFieldData {
assert !numericType.isFloatingPoint(); assert !numericType.isFloatingPoint();
return new NumericDVIndexFieldData(index, fieldNames, mapper.fieldDataType()); return new NumericDVIndexFieldData(index, fieldNames, mapper.fieldDataType());
} else if (numericType != null) { } 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()); return new SortedNumericDVIndexFieldData(index, fieldNames, numericType, mapper.fieldDataType());
} else { } else {
// prior to ES 1.4: multi-valued numerics were boxed inside a byte[] as BINARY // prior to ES 1.4: multi-valued numerics were boxed inside a byte[] as BINARY

View File

@ -127,7 +127,7 @@ public class IndexingStats implements Streamable, ToXContent {
deleteTimeInMillis = in.readVLong(); deleteTimeInMillis = in.readVLong();
deleteCurrent = 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(); noopUpdateCount = in.readVLong();
} }
} }
@ -142,7 +142,7 @@ public class IndexingStats implements Streamable, ToXContent {
out.writeVLong(deleteTimeInMillis); out.writeVLong(deleteTimeInMillis);
out.writeVLong(deleteCurrent); 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); out.writeVLong(noopUpdateCount);
} }
} }

View File

@ -200,7 +200,7 @@ public abstract class NumberFieldMapper<T extends Number> extends AbstractFieldM
this.ignoreMalformed = ignoreMalformed; this.ignoreMalformed = ignoreMalformed;
this.coerce = coerce; this.coerce = coerce;
Version v = Version.indexCreated(indexSettings); 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 @Override

View File

@ -352,7 +352,7 @@ public class QueryParseContext {
return fieldMapping; return fieldMapping;
} else { } else {
Version indexCreatedVersion = indexQueryParser.getIndexCreatedVersion(); 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 + "]"); throw new QueryParsingException(index, "Strict field resolution and no field mapping can be found for the field with name [" + name + "]");
} else { } else {
return fieldMapping; return fieldMapping;

View File

@ -124,7 +124,7 @@ public class StoreFileMetaData implements Streamable {
String versionString = in.readOptionalString(); String versionString = in.readOptionalString();
writtenBy = Lucene.parseVersionLenient(versionString, null); 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(); hash = in.readBytesRef();
} else { } else {
hash = new BytesRef(); hash = new BytesRef();
@ -139,7 +139,7 @@ public class StoreFileMetaData implements Streamable {
if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_0)) { if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_0)) {
out.writeOptionalString(writtenBy == null ? null : writtenBy.toString()); 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); out.writeBytesRef(hash);
} }
} }

View File

@ -91,7 +91,7 @@ public class CircuitBreakerStats implements Streamable, ToXContent {
} else { } else {
this.trippedCount = -1; 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); this.name = CircuitBreaker.Name.readFrom(in);
} else { } else {
this.name = CircuitBreaker.Name.FIELDDATA; this.name = CircuitBreaker.Name.FIELDDATA;
@ -106,7 +106,7 @@ public class CircuitBreakerStats implements Streamable, ToXContent {
if (out.getVersion().onOrAfter(Version.V_1_2_0)) { if (out.getVersion().onOrAfter(Version.V_1_2_0)) {
out.writeLong(trippedCount); 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); CircuitBreaker.Name.writeTo(name, out);
} }
} }

View File

@ -69,7 +69,7 @@ class RecoveryTranslogOperationsRequest extends TransportRequest {
int size = in.readVInt(); int size = in.readVInt();
operations = Lists.newArrayListWithExpectedSize(size); operations = Lists.newArrayListWithExpectedSize(size);
for (int i = 0; i < size; i++) { 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)); operations.add(TranslogStreams.CHECKSUMMED_TRANSLOG_STREAM.read(in));
} else { } else {
operations.add(TranslogStreams.LEGACY_TRANSLOG_STREAM.read(in)); operations.add(TranslogStreams.LEGACY_TRANSLOG_STREAM.read(in));
@ -85,7 +85,7 @@ class RecoveryTranslogOperationsRequest extends TransportRequest {
shardId.writeTo(out); shardId.writeTo(out);
out.writeVInt(operations.size()); out.writeVInt(operations.size());
for (Translog.Operation operation : operations) { 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); TranslogStreams.CHECKSUMMED_TRANSLOG_STREAM.write(out, operation);
} else { } else {
TranslogStreams.LEGACY_TRANSLOG_STREAM.write(out, operation); TranslogStreams.LEGACY_TRANSLOG_STREAM.write(out, operation);

View File

@ -116,7 +116,7 @@ public class DoubleTerms extends InternalTerms {
@Override @Override
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
this.name = in.readString(); 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(); this.docCountError = in.readLong();
} else { } else {
this.docCountError = -1; this.docCountError = -1;
@ -124,7 +124,7 @@ public class DoubleTerms extends InternalTerms {
this.order = InternalOrder.Streams.readOrder(in); this.order = InternalOrder.Streams.readOrder(in);
this.formatter = ValueFormatterStreams.readOptional(in); this.formatter = ValueFormatterStreams.readOptional(in);
this.requiredSize = readSize(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.shardSize = readSize(in);
this.showTermDocCountError = in.readBoolean(); this.showTermDocCountError = in.readBoolean();
} else { } else {
@ -138,7 +138,7 @@ public class DoubleTerms extends InternalTerms {
double term = in.readDouble(); double term = in.readDouble();
long docCount = in.readVLong(); long docCount = in.readVLong();
long bucketDocCountError = -1; 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(); bucketDocCountError = in.readLong();
} }
InternalAggregations aggregations = InternalAggregations.readAggregations(in); InternalAggregations aggregations = InternalAggregations.readAggregations(in);
@ -151,13 +151,13 @@ public class DoubleTerms extends InternalTerms {
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
out.writeString(name); 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); out.writeLong(docCountError);
} }
InternalOrder.Streams.writeOrder(order, out); InternalOrder.Streams.writeOrder(order, out);
ValueFormatterStreams.writeOptional(formatter, out); ValueFormatterStreams.writeOptional(formatter, out);
writeSize(requiredSize, 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); writeSize(shardSize, out);
out.writeBoolean(showTermDocCountError); out.writeBoolean(showTermDocCountError);
} }
@ -166,7 +166,7 @@ public class DoubleTerms extends InternalTerms {
for (InternalTerms.Bucket bucket : buckets) { for (InternalTerms.Bucket bucket : buckets) {
out.writeDouble(((Bucket) bucket).term); out.writeDouble(((Bucket) bucket).term);
out.writeVLong(bucket.getDocCount()); 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); out.writeLong(bucket.docCountError);
} }
((InternalAggregations) bucket.getAggregations()).writeTo(out); ((InternalAggregations) bucket.getAggregations()).writeTo(out);

View File

@ -117,7 +117,7 @@ public class LongTerms extends InternalTerms {
@Override @Override
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
this.name = in.readString(); 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(); this.docCountError = in.readLong();
} else { } else {
this.docCountError = -1; this.docCountError = -1;
@ -125,7 +125,7 @@ public class LongTerms extends InternalTerms {
this.order = InternalOrder.Streams.readOrder(in); this.order = InternalOrder.Streams.readOrder(in);
this.formatter = ValueFormatterStreams.readOptional(in); this.formatter = ValueFormatterStreams.readOptional(in);
this.requiredSize = readSize(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.shardSize = readSize(in);
this.showTermDocCountError = in.readBoolean(); this.showTermDocCountError = in.readBoolean();
} else { } else {
@ -139,7 +139,7 @@ public class LongTerms extends InternalTerms {
long term = in.readLong(); long term = in.readLong();
long docCount = in.readVLong(); long docCount = in.readVLong();
long bucketDocCountError = -1; 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(); bucketDocCountError = in.readLong();
} }
InternalAggregations aggregations = InternalAggregations.readAggregations(in); InternalAggregations aggregations = InternalAggregations.readAggregations(in);
@ -152,13 +152,13 @@ public class LongTerms extends InternalTerms {
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
out.writeString(name); 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); out.writeLong(docCountError);
} }
InternalOrder.Streams.writeOrder(order, out); InternalOrder.Streams.writeOrder(order, out);
ValueFormatterStreams.writeOptional(formatter, out); ValueFormatterStreams.writeOptional(formatter, out);
writeSize(requiredSize, 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); writeSize(shardSize, out);
out.writeBoolean(showTermDocCountError); out.writeBoolean(showTermDocCountError);
} }
@ -167,7 +167,7 @@ public class LongTerms extends InternalTerms {
for (InternalTerms.Bucket bucket : buckets) { for (InternalTerms.Bucket bucket : buckets) {
out.writeLong(((Bucket) bucket).term); out.writeLong(((Bucket) bucket).term);
out.writeVLong(bucket.getDocCount()); 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); out.writeLong(bucket.docCountError);
} }
((InternalAggregations) bucket.getAggregations()).writeTo(out); ((InternalAggregations) bucket.getAggregations()).writeTo(out);

View File

@ -115,14 +115,14 @@ public class StringTerms extends InternalTerms {
@Override @Override
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
this.name = in.readString(); 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(); this.docCountError = in.readLong();
} else { } else {
this.docCountError = -1; this.docCountError = -1;
} }
this.order = InternalOrder.Streams.readOrder(in); this.order = InternalOrder.Streams.readOrder(in);
this.requiredSize = readSize(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.shardSize = readSize(in);
this.showTermDocCountError = in.readBoolean(); this.showTermDocCountError = in.readBoolean();
} else { } else {
@ -136,7 +136,7 @@ public class StringTerms extends InternalTerms {
BytesRef termBytes = in.readBytesRef(); BytesRef termBytes = in.readBytesRef();
long docCount = in.readVLong(); long docCount = in.readVLong();
long bucketDocCountError = -1; 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(); bucketDocCountError = in.readLong();
} }
InternalAggregations aggregations = InternalAggregations.readAggregations(in); InternalAggregations aggregations = InternalAggregations.readAggregations(in);
@ -149,12 +149,12 @@ public class StringTerms extends InternalTerms {
@Override @Override
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
out.writeString(name); 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); out.writeLong(docCountError);
} }
InternalOrder.Streams.writeOrder(order, out); InternalOrder.Streams.writeOrder(order, out);
writeSize(requiredSize, 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); writeSize(shardSize, out);
out.writeBoolean(showTermDocCountError); out.writeBoolean(showTermDocCountError);
} }
@ -163,7 +163,7 @@ public class StringTerms extends InternalTerms {
for (InternalTerms.Bucket bucket : buckets) { for (InternalTerms.Bucket bucket : buckets) {
out.writeBytesRef(((Bucket) bucket).termBytes); out.writeBytesRef(((Bucket) bucket).termBytes);
out.writeVLong(bucket.getDocCount()); 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); out.writeLong(bucket.docCountError);
} }
((InternalAggregations) bucket.getAggregations()).writeTo(out); ((InternalAggregations) bucket.getAggregations()).writeTo(out);

View File

@ -113,7 +113,7 @@ public class InternalSearchResponse implements Streamable, ToXContent {
} }
timedOut = in.readBoolean(); 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(); terminatedEarly = in.readOptionalBoolean();
} }
} }
@ -135,7 +135,7 @@ public class InternalSearchResponse implements Streamable, ToXContent {
} }
out.writeBoolean(timedOut); 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); out.writeOptionalBoolean(terminatedEarly);
} }

View File

@ -273,7 +273,7 @@ public class ShardSearchRequest extends TransportRequest implements IndicesReque
useSlowScroll = in.getVersion().before(ParsedScrollId.SCROLL_SEARCH_AFTER_MINIMUM_VERSION); 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(); queryCache = in.readOptionalBoolean();
} }
originalIndices = OriginalIndices.readOptionalOriginalIndices(in); originalIndices = OriginalIndices.readOptionalOriginalIndices(in);
@ -322,7 +322,7 @@ public class ShardSearchRequest extends TransportRequest implements IndicesReque
out.writeBoolean(useSlowScroll); 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); out.writeOptionalBoolean(queryCache);
} }
OriginalIndices.writeOptionalOriginalIndices(originalIndices, out); OriginalIndices.writeOptionalOriginalIndices(originalIndices, out);

View File

@ -164,7 +164,7 @@ public class QuerySearchResult extends QuerySearchResultProvider {
suggest = Suggest.readSuggest(Suggest.Fields.SUGGEST, in); suggest = Suggest.readSuggest(Suggest.Fields.SUGGEST, in);
} }
searchTimedOut = in.readBoolean(); 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(); terminatedEarly = in.readOptionalBoolean();
} }
} }
@ -194,7 +194,7 @@ public class QuerySearchResult extends QuerySearchResultProvider {
suggest.writeTo(out); suggest.writeTo(out);
} }
out.writeBoolean(searchTimedOut); 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); out.writeOptionalBoolean(terminatedEarly);
} }
} }

View File

@ -589,7 +589,7 @@ public class Suggest implements Iterable<Suggest.Suggestion<? extends Entry<? ex
score = in.readFloat(); score = in.readFloat();
highlighted = in.readOptionalText(); highlighted = in.readOptionalText();
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
collateMatch = in.readOptionalBoolean(); collateMatch = in.readOptionalBoolean();
} }
} }
@ -600,7 +600,7 @@ public class Suggest implements Iterable<Suggest.Suggestion<? extends Entry<? ex
out.writeFloat(score); out.writeFloat(score);
out.writeOptionalText(highlighted); out.writeOptionalText(highlighted);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
out.writeOptionalBoolean(collateMatch); out.writeOptionalBoolean(collateMatch);
} }
} }

View File

@ -110,7 +110,7 @@ public class IndexWarmersMetaData implements IndexMetaData.Custom {
source = in.readBytesReference(); source = in.readBytesReference();
} }
Boolean queryCache = null; 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(); queryCache = in.readOptionalBoolean();
} }
entries[i] = new Entry(name, types, queryCache, source); entries[i] = new Entry(name, types, queryCache, source);
@ -130,7 +130,7 @@ public class IndexWarmersMetaData implements IndexMetaData.Custom {
out.writeBoolean(true); out.writeBoolean(true);
out.writeBytesReference(entry.source()); out.writeBytesReference(entry.source());
} }
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
out.writeOptionalBoolean(entry.queryCache()); out.writeOptionalBoolean(entry.queryCache());
} }
} }

View File

@ -127,7 +127,7 @@ final class ActionNames {
} }
static String incomingAction(String action, Version version) { static String incomingAction(String action, Version version) {
if (version.before(Version.V_1_4_0_Beta)) { if (version.before(Version.V_1_4_0_Beta1)) {
String post_1_4_action = post_1_4_action(action); String post_1_4_action = post_1_4_action(action);
//custom action e.g. registered through plugin are not mapped, fallback to the original one //custom action e.g. registered through plugin are not mapped, fallback to the original one
if (post_1_4_action != null) { if (post_1_4_action != null) {
@ -138,7 +138,7 @@ final class ActionNames {
} }
static String outgoingAction(String action, Version version) { static String outgoingAction(String action, Version version) {
if (version.before(Version.V_1_4_0_Beta)) { if (version.before(Version.V_1_4_0_Beta1)) {
String pre_1_4_Action = pre_1_4_Action(action); String pre_1_4_Action = pre_1_4_Action(action);
//custom actions e.g. registered through plugins are not mapped, fallback to the original one //custom actions e.g. registered through plugins are not mapped, fallback to the original one
if (pre_1_4_Action != null) { if (pre_1_4_Action != null) {

View File

@ -51,7 +51,7 @@ public class OriginalIndicesTests extends ElasticsearchTestCase {
in.setVersion(out.getVersion()); in.setVersion(out.getVersion());
OriginalIndices originalIndices2 = OriginalIndices.readOriginalIndices(in); OriginalIndices originalIndices2 = OriginalIndices.readOriginalIndices(in);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
assertThat(originalIndices2.indices(), equalTo(originalIndices.indices())); assertThat(originalIndices2.indices(), equalTo(originalIndices.indices()));
assertThat(originalIndices2.indicesOptions(), equalTo(originalIndices.indicesOptions())); assertThat(originalIndices2.indicesOptions(), equalTo(originalIndices.indicesOptions()));
} else { } else {
@ -81,7 +81,7 @@ public class OriginalIndicesTests extends ElasticsearchTestCase {
in.setVersion(out.getVersion()); in.setVersion(out.getVersion());
OriginalIndices originalIndices2 = OriginalIndices.readOptionalOriginalIndices(in); OriginalIndices originalIndices2 = OriginalIndices.readOptionalOriginalIndices(in);
if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
assertThat(originalIndices2.indices(), equalTo(originalIndices.indices())); assertThat(originalIndices2.indices(), equalTo(originalIndices.indices()));
assertThat(originalIndices2.indicesOptions(), equalTo(originalIndices.indicesOptions())); assertThat(originalIndices2.indicesOptions(), equalTo(originalIndices.indicesOptions()));
} else { } else {

View File

@ -82,7 +82,7 @@ public class MultiGetShardRequestTests extends ElasticsearchTestCase {
assertThat(multiGetShardRequest2.preference(), equalTo(multiGetShardRequest.preference())); assertThat(multiGetShardRequest2.preference(), equalTo(multiGetShardRequest.preference()));
assertThat(multiGetShardRequest2.realtime(), equalTo(multiGetShardRequest.realtime())); assertThat(multiGetShardRequest2.realtime(), equalTo(multiGetShardRequest.realtime()));
assertThat(multiGetShardRequest2.refresh(), equalTo(multiGetShardRequest.refresh())); assertThat(multiGetShardRequest2.refresh(), equalTo(multiGetShardRequest.refresh()));
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
assertThat(multiGetShardRequest2.ignoreErrorsOnGeneratedFields(), equalTo(multiGetShardRequest.ignoreErrorsOnGeneratedFields())); assertThat(multiGetShardRequest2.ignoreErrorsOnGeneratedFields(), equalTo(multiGetShardRequest.ignoreErrorsOnGeneratedFields()));
} else { } else {
assertThat(multiGetShardRequest2.ignoreErrorsOnGeneratedFields(), equalTo(false)); assertThat(multiGetShardRequest2.ignoreErrorsOnGeneratedFields(), equalTo(false));
@ -91,7 +91,7 @@ public class MultiGetShardRequestTests extends ElasticsearchTestCase {
for (int i = 0; i < multiGetShardRequest2.items.size(); i++) { for (int i = 0; i < multiGetShardRequest2.items.size(); i++) {
MultiGetRequest.Item item = multiGetShardRequest.items.get(i); MultiGetRequest.Item item = multiGetShardRequest.items.get(i);
MultiGetRequest.Item item2 = multiGetShardRequest2.items.get(i); MultiGetRequest.Item item2 = multiGetShardRequest2.items.get(i);
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
assertThat(item2.index(), equalTo(item.index())); assertThat(item2.index(), equalTo(item.index()));
} else { } else {
//before 1.4 we have only one index, the concrete one //before 1.4 we have only one index, the concrete one
@ -104,7 +104,7 @@ public class MultiGetShardRequestTests extends ElasticsearchTestCase {
assertThat(item2.versionType(), equalTo(item.versionType())); assertThat(item2.versionType(), equalTo(item.versionType()));
assertThat(item2.fetchSourceContext(), equalTo(item.fetchSourceContext())); assertThat(item2.fetchSourceContext(), equalTo(item.fetchSourceContext()));
} }
if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta)) { if (in.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
//we don't serialize the original index before 1.4, it'll get the concrete one //we don't serialize the original index before 1.4, it'll get the concrete one
assertThat(multiGetShardRequest2.indices(), equalTo(multiGetShardRequest.indices())); assertThat(multiGetShardRequest2.indices(), equalTo(multiGetShardRequest.indices()));
assertThat(multiGetShardRequest2.indicesOptions(), equalTo(multiGetShardRequest.indicesOptions())); assertThat(multiGetShardRequest2.indicesOptions(), equalTo(multiGetShardRequest.indicesOptions()));

View File

@ -57,7 +57,7 @@ public class DateHistogramOffsetTests extends ElasticsearchIntegrationTest {
protected Settings nodeSettings(int nodeOrdinal) { protected Settings nodeSettings(int nodeOrdinal) {
return ImmutableSettings.builder() return ImmutableSettings.builder()
.put(super.nodeSettings(nodeOrdinal)) .put(super.nodeSettings(nodeOrdinal))
.put(AssertingLocalTransport.ASSERTING_TRANSPORT_MIN_VERSION_KEY, Version.V_1_4_0_Beta).build(); .put(AssertingLocalTransport.ASSERTING_TRANSPORT_MIN_VERSION_KEY, Version.V_1_4_0_Beta1).build();
} }
@After @After

View File

@ -118,16 +118,16 @@ public class ActionNamesBackwardsCompatibilityTest extends ElasticsearchBackward
private static final Map<String, Version> actionsVersions = new HashMap<>(); private static final Map<String, Version> actionsVersions = new HashMap<>();
static { static {
actionsVersions.put(BenchmarkService.STATUS_ACTION_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_Beta); actionsVersions.put(BenchmarkService.START_ACTION_NAME, Version.V_1_4_0_Beta1);
actionsVersions.put(BenchmarkService.ABORT_ACTION_NAME, Version.V_1_4_0_Beta); actionsVersions.put(BenchmarkService.ABORT_ACTION_NAME, Version.V_1_4_0_Beta1);
actionsVersions.put(BenchmarkAction.NAME, Version.V_1_4_0_Beta); actionsVersions.put(BenchmarkAction.NAME, Version.V_1_4_0_Beta1);
actionsVersions.put(BenchmarkStatusAction.NAME, Version.V_1_4_0_Beta); actionsVersions.put(BenchmarkStatusAction.NAME, Version.V_1_4_0_Beta1);
actionsVersions.put(AbortBenchmarkAction.NAME, Version.V_1_4_0_Beta); actionsVersions.put(AbortBenchmarkAction.NAME, Version.V_1_4_0_Beta1);
actionsVersions.put(GetIndexAction.NAME, Version.V_1_4_0_Beta); actionsVersions.put(GetIndexAction.NAME, Version.V_1_4_0_Beta1);
actionsVersions.put(ExistsAction.NAME, 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_Beta); actionsVersions.put(ExistsAction.NAME + "[s]", Version.V_1_4_0_Beta1);
actionsVersions.put(IndicesStore.ACTION_SHARD_EXISTS, Version.V_1_3_0); actionsVersions.put(IndicesStore.ACTION_SHARD_EXISTS, Version.V_1_3_0);

View File

@ -83,7 +83,7 @@ public class ActionNamesTests extends ElasticsearchIntegrationTest {
Version version = randomVersion(); Version version = randomVersion();
String outgoingAction = ActionNames.outgoingAction(action, version); 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)); assertThat(outgoingAction, equalTo(action));
} else { } else {
assertThat(outgoingAction, not(equalTo(action))); assertThat(outgoingAction, not(equalTo(action)));
@ -109,7 +109,7 @@ public class ActionNamesTests extends ElasticsearchIntegrationTest {
action = randomAsciiOfLength(randomInt(30)); action = randomAsciiOfLength(randomInt(30));
} while(pre_1_4_names.contains(action)); } while(pre_1_4_names.contains(action));
} else { } 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); action = randomFrom(pre_1_4_names);
} else { } else {
action = randomFrom(actions); action = randomFrom(actions);
@ -117,7 +117,7 @@ public class ActionNamesTests extends ElasticsearchIntegrationTest {
} }
String incomingAction = ActionNames.incomingAction (action, version); 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)); assertThat(incomingAction, equalTo(action));
} else { } else {
assertThat(incomingAction, not(equalTo(action))); assertThat(incomingAction, not(equalTo(action)));