@Override protected void doWriteTo(StreamOutput out) throws IOException { boolean hasContentType = contentType != null; out.writeBoolean(hasContentType); if (hasContentType) { XContentType.writeTo(contentType, out); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeString(id); out.writeBytesReference(config); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { xContentType.writeTo(out); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(id); out.writeBytesReference(source); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { xContentType.writeTo(out); } } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(lang == null ? "" : lang); out.writeOptionalString(id); out.writeBytesReference(content); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { xContentType.writeTo(out); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeOptionalString(id); out.writeBoolean(verbose); out.writeBytesReference(source); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { xContentType.writeTo(out); } }
@Override public void writeTo(StreamOutput out) throws IOException { out.writeOptionalString(index); out.writeOptionalString(type); out.writeBoolean(doc != null); if (doc != null) { out.writeGenericValue(doc); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { xContentType.writeTo(out); } } else { out.writeString(id); } out.writeOptionalStringArray(fields); out.writeGenericValue(perFieldAnalyzer); out.writeOptionalString(routing); out.writeLong(version); versionType.writeTo(out); }
XContentType contentType = XContentType.fromMediaTypeOrFormat(options.get(CONTENT_TYPE_OPTION)); out.writeBoolean(true); contentType.writeTo(out); } else { out.writeBoolean(false);
out.writeBytesReference(doc); if (out.getVersion().onOrAfter(Version.V_5_3_0)) { xContentType.writeTo(out);