Delete By Query: Types are not serialized over network, causing them to be ignored, closes #580.

This commit is contained in:
kimchy 2010-12-30 14:43:08 +02:00
parent 976d14705a
commit fea93b7fea

View File

@ -293,6 +293,16 @@ public class DeleteByQueryRequest extends IndicesReplicationOperationRequest {
if (in.readBoolean()) { if (in.readBoolean()) {
routing = in.readUTF(); routing = in.readUTF();
} }
int size = in.readVInt();
if (size == 0) {
types = Strings.EMPTY_ARRAY;
} else {
types = new String[size];
for (int i = 0; i < size; i++) {
types[i] = in.readUTF();
}
}
} }
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
@ -313,6 +323,11 @@ public class DeleteByQueryRequest extends IndicesReplicationOperationRequest {
out.writeBoolean(true); out.writeBoolean(true);
out.writeUTF(routing); out.writeUTF(routing);
} }
out.writeVInt(types.length);
for (String type : types) {
out.writeUTF(type);
}
} }
@Override public String toString() { @Override public String toString() {