File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
modules/elasticsearch/src/main/java/org/elasticsearch/index/get Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,9 @@ public static GetResult readGetResult(StreamInput in) throws IOException {
300
300
301
301
@ Override public void readFrom (StreamInput in ) throws IOException {
302
302
index = in .readUTF ();
303
- type = in .readUTF ();
303
+ if (in .readBoolean ()) {
304
+ type = in .readUTF ();
305
+ }
304
306
id = in .readUTF ();
305
307
version = in .readLong ();
306
308
exists = in .readBoolean ();
@@ -323,7 +325,12 @@ public static GetResult readGetResult(StreamInput in) throws IOException {
323
325
324
326
@ Override public void writeTo (StreamOutput out ) throws IOException {
325
327
out .writeUTF (index );
326
- out .writeUTF (type );
328
+ if (type == null ) {
329
+ out .writeBoolean (false );
330
+ } else {
331
+ out .writeBoolean (true );
332
+ out .writeUTF (type );
333
+ }
327
334
out .writeUTF (id );
328
335
out .writeLong (version );
329
336
out .writeBoolean (exists );
You can’t perform that action at this time.
0 commit comments