Get/MultiGet API with no type provided and doc does not exists causes a failure, closes #1794.

This commit is contained in:
Shay Banon 2012-03-18 12:06:16 +02:00
parent d25c4cc914
commit 6ab1c9e442
1 changed files with 2 additions and 2 deletions

View File

@ -309,7 +309,7 @@ public class GetResult implements Streamable, Iterable<GetField>, ToXContent {
@Override
public void readFrom(StreamInput in) throws IOException {
index = in.readUTF();
type = in.readUTF();
type = in.readOptionalUTF();
id = in.readUTF();
version = in.readLong();
exists = in.readBoolean();
@ -334,7 +334,7 @@ public class GetResult implements Streamable, Iterable<GetField>, ToXContent {
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeUTF(index);
out.writeUTF(type);
out.writeOptionalUTF(type);
out.writeUTF(id);
out.writeLong(version);
out.writeBoolean(exists);