File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
modules/elasticsearch/src/main/java/org/elasticsearch/action/count Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,9 @@ public String[] types() {
84
84
@ Override public void readFrom (StreamInput in ) throws IOException {
85
85
super .readFrom (in );
86
86
minScore = in .readFloat ();
87
- querySource = new byte [in .readVInt ()];
87
+ querySourceLength = in .readVInt ();
88
+ querySourceOffset = 0 ;
89
+ querySource = new byte [querySourceLength ];
88
90
in .readFully (querySource );
89
91
if (in .readBoolean ()) {
90
92
queryParserName = in .readUTF ();
@@ -101,8 +103,8 @@ public String[] types() {
101
103
@ Override public void writeTo (StreamOutput out ) throws IOException {
102
104
super .writeTo (out );
103
105
out .writeFloat (minScore );
104
- out .writeVInt (querySource . length );
105
- out .writeBytes (querySource );
106
+ out .writeVInt (querySourceLength );
107
+ out .writeBytes (querySource , querySourceOffset , querySourceLength );
106
108
if (queryParserName == null ) {
107
109
out .writeBoolean (false );
108
110
} else {
You can’t perform that action at this time.
0 commit comments