mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
fix serialization of count request
This commit is contained in:
parent
6a0a9ff374
commit
c7cb353956
@ -84,7 +84,9 @@ class ShardCountRequest extends BroadcastShardOperationRequest {
|
||||
@Override public void readFrom(StreamInput in) throws IOException {
|
||||
super.readFrom(in);
|
||||
minScore = in.readFloat();
|
||||
querySource = new byte[in.readVInt()];
|
||||
querySourceLength = in.readVInt();
|
||||
querySourceOffset = 0;
|
||||
querySource = new byte[querySourceLength];
|
||||
in.readFully(querySource);
|
||||
if (in.readBoolean()) {
|
||||
queryParserName = in.readUTF();
|
||||
@ -101,8 +103,8 @@ class ShardCountRequest extends BroadcastShardOperationRequest {
|
||||
@Override public void writeTo(StreamOutput out) throws IOException {
|
||||
super.writeTo(out);
|
||||
out.writeFloat(minScore);
|
||||
out.writeVInt(querySource.length);
|
||||
out.writeBytes(querySource);
|
||||
out.writeVInt(querySourceLength);
|
||||
out.writeBytes(querySource, querySourceOffset, querySourceLength);
|
||||
if (queryParserName == null) {
|
||||
out.writeBoolean(false);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user