Get Action: Allow to pass refresh forcing getting latest, closes #488.

This commit is contained in:
kimchy 2010-11-07 23:51:18 +02:00
parent c095d72439
commit c9228ed26d
1 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,7 @@ public class GetRequest extends SingleOperationRequest {
@Override public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
refresh = in.readBoolean();
int size = in.readInt();
if (size >= 0) {
fields = new String[size];
@ -160,6 +161,7 @@ public class GetRequest extends SingleOperationRequest {
@Override public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeBoolean(refresh);
if (fields == null) {
out.writeInt(-1);
} else {