@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeUTF(type); out.writeUTF(id); if (routing == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeUTF(routing); } out.writeBoolean(refresh); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeSharedString(type); out.writeOptionalString(id); out.writeOptionalString(routing); out.writeOptionalString(parent); out.writeOptionalString(timestamp); out.writeLong(ttl); out.writeBytesReference(source); out.writeByte(opType.id()); out.writeBoolean(refresh); out.writeLong(version); out.writeByte(versionType.getValue()); }