Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing bug to prevent NullPointerException while doing PUT mappings #2580

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Enhancements
* Introduce node level circuit breakers for k-NN [#2509](https://github.com/opensearch-project/k-NN/pull/2509)
### Bug Fixes
* Fixing bug to prevent NullPointerException while doing PUT mappings [#2556](https://github.com/opensearch-project/k-NN/issues/2556)
### Infrastructure
* Removed JDK 11 and 17 version from CI runs [#1921](https://github.com/opensearch-project/k-NN/pull/1921)
* Upgrade min JDK compatibility to JDK 21 [#2422](https://github.com/opensearch-project/k-NN/pull/2422)
Expand Down
2 changes: 1 addition & 1 deletion jni/external/faiss
Submodule faiss updated from 0cbc2a to 2cb37f
2 changes: 1 addition & 1 deletion jni/external/nmslib
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,15 @@ 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
Loading