@Override protected void doWriteTo(StreamOutput out) throws IOException { if (supplier != null) { throw new IllegalStateException("supplier must be null, can't serialize suppliers, missing a rewriteAndFetch?"); } out.writeString(fieldName); boolean hasShape = shape != null; out.writeBoolean(hasShape); if (hasShape) { out.writeNamedWriteable(shape); } else { out.writeOptionalString(indexedShapeId); out.writeOptionalString(indexedShapeType); out.writeOptionalString(indexedShapeIndex); out.writeOptionalString(indexedShapePath); if (out.getVersion().onOrAfter(Version.V_6_4_0)) { out.writeOptionalString(indexedShapeRouting); } else if (indexedShapeRouting != null) { throw new IllegalStateException("indexed shape routing cannot be serialized to older nodes"); } } relation.writeTo(out); out.writeOptionalWriteable(strategy); out.writeBoolean(ignoreUnmapped); }
@Override protected void doWriteTo(StreamOutput out) throws IOException { if (supplier != null) { throw new IllegalStateException("supplier must be null, can't serialize suppliers, missing a rewriteAndFetch?"); } out.writeString(fieldName); boolean hasShape = shape != null; out.writeBoolean(hasShape); if (hasShape) { out.writeNamedWriteable(shape); } else { out.writeOptionalString(indexedShapeId); out.writeOptionalString(indexedShapeType); out.writeOptionalString(indexedShapeIndex); out.writeOptionalString(indexedShapePath); if (out.getVersion().onOrAfter(Version.V_6_4_0)) { out.writeOptionalString(indexedShapeRouting); } else if (indexedShapeRouting != null) { throw new IllegalStateException("indexed shape routing cannot be serialized to older nodes"); } } relation.writeTo(out); out.writeOptionalWriteable(strategy); out.writeBoolean(ignoreUnmapped); }
@Override protected void doWriteTo(StreamOutput out) throws IOException { if (supplier != null) { throw new IllegalStateException("supplier must be null, can't serialize suppliers, missing a rewriteAndFetch?"); } out.writeString(fieldName); boolean hasShape = shape != null; out.writeBoolean(hasShape); if (hasShape) { out.writeNamedWriteable(shape); } else { out.writeOptionalString(indexedShapeId); out.writeOptionalString(indexedShapeType); out.writeOptionalString(indexedShapeIndex); out.writeOptionalString(indexedShapePath); if (out.getVersion().onOrAfter(Version.V_6_4_0)) { out.writeOptionalString(indexedShapeRouting); } else if (indexedShapeRouting != null) { throw new IllegalStateException("indexed shape routing cannot be serialized to older nodes"); } } relation.writeTo(out); out.writeOptionalWriteable(strategy); out.writeBoolean(ignoreUnmapped); }
@Override protected void doWriteTo(StreamOutput out) throws IOException { out.writeString(fieldName); boolean hasShape = shape != null; out.writeBoolean(hasShape); if (hasShape) { out.writeNamedWriteable(shape); } else { out.writeOptionalString(indexedShapeId); out.writeOptionalString(indexedShapeType); out.writeOptionalString(indexedShapeIndex); out.writeOptionalString(indexedShapePath); } relation.writeTo(out); out.writeOptionalWriteable(strategy); out.writeBoolean(ignoreUnmapped); }