Skip to content

Commit

Permalink
Updating NPE bug fixes for #2556
Browse files Browse the repository at this point in the history
Signed-off-by: Arun Ganesh <oaganesh@amazon.com>
  • Loading branch information
oaganesh committed Mar 5, 2025
1 parent e7d5304 commit 0b0fed0
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,14 @@ public static class Builder extends ParametrizedFieldMapper.Builder {
b.startObject(n);
v.toXContent(b, ToXContent.EMPTY_PARAMS);
b.endObject();
}), m -> m.getMethodComponentContext().getName());
}),
m -> {
if (m == null) {
throw new IllegalArgumentException("Mapping update for knn_vector fields is not supported. " +
"Cannot update mapping without the original method configuration.");
}
return m.getMethodComponentContext().getName();
});

protected final Parameter<String> mode = Parameter.restrictedStringParam(
KNNConstants.MODE_PARAMETER,
Expand Down

0 comments on commit 0b0fed0

Please sign in to comment.