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
1 changed files with 15 additions and 0 deletions

View File

@ -293,6 +293,16 @@ public class DeleteByQueryRequest extends IndicesReplicationOperationRequest {
if (in.readBoolean()) {
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 {
@ -313,6 +323,11 @@ public class DeleteByQueryRequest extends IndicesReplicationOperationRequest {
out.writeBoolean(true);
out.writeUTF(routing);
}
out.writeVInt(types.length);
for (String type : types) {
out.writeUTF(type);
}
}
@Override public String toString() {