Skip to content

Commit

Permalink
Fix a typo.
Browse files Browse the repository at this point in the history
Signed-off-by: Bo Zhang <bzhangam@amazon.com>
  • Loading branch information
bzhangam committed Jan 8, 2025
1 parent f0eadae commit f9f0901
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public NeuralQueryBuilder(StreamInput in) throws IOException {
// The query image field was introduced since v2.11.0 through the
// https://github.com/opensearch-project/neural-search/pull/359 but at that time we didn't add it to
// NeuralQueryBuilder(StreamInput in) and doWriteTo(StreamOutput out) function. The fix will be
// introduced in v2.19.0 so we need to this for the backward compatibility.
// introduced in v2.19.0 so we need this check for the backward compatibility.
if (isClusterOnOrAfterMinReqVersion(QUERY_IMAGE_FIELD.getPreferredName())) {
this.queryText = in.readOptionalString();
this.queryImage = in.readOptionalString();
Expand Down Expand Up @@ -273,6 +273,10 @@ public NeuralQueryBuilder(StreamInput in) throws IOException {
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
out.writeString(this.fieldName);
// The query image field was introduced since v2.11.0 through the
// https://github.com/opensearch-project/neural-search/pull/359 but at that time we didn't add it to
// NeuralQueryBuilder(StreamInput in) and doWriteTo(StreamOutput out) function. The fix will be
// introduced in v2.19.0 so we need this check for the backward compatibility.
if (isClusterOnOrAfterMinReqVersion(QUERY_IMAGE_FIELD.getPreferredName())) {
out.writeOptionalString(this.queryText);
out.writeOptionalString(this.queryImage);
Expand Down

0 comments on commit f9f0901

Please sign in to comment.