-
Notifications
You must be signed in to change notification settings - Fork 138
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
Removing redundant type conversions for script scoring for hamming space with binary vectors #2351
base: main
Are you sure you want to change the base?
Conversation
f58ac9a
to
d36c189
Compare
src/main/java/org/opensearch/knn/plugin/script/KNNScoringSpace.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/plugin/script/KNNScoringSpaceUtil.java
Outdated
Show resolved
Hide resolved
@kasundra07 I had a question around approach: #1827 (comment). Can you respond on this PR thread:
|
src/main/java/org/opensearch/knn/index/KNNVectorScriptDocValues.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/knn/index/KNNVectorScriptDocValues.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wil Review this PR once this changes are completed to create the new Class for Byte.
public abstract class KNNByteVectorScriptDocValues extends ScriptDocValues<byte[]> {
src/main/java/org/opensearch/knn/index/KNNVectorScriptDocValues.java
Outdated
Show resolved
Hide resolved
…ace with binary vectors Signed-off-by: Bansi Kasundra <[email protected]>
e4b8382
to
fedc541
Compare
…ctors Signed-off-by: Bansi Kasundra <[email protected]>
fedc541
to
bdfc4f8
Compare
src/main/java/org/opensearch/knn/plugin/script/KNNScoringSpace.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Please address @VijayanB feedback
Signed-off-by: Bansi Kasundra <[email protected]>
Description
Removes the unnecessary type conversion from byte[] to float[] and again float[] to byte for script score on KNN Binary vector using hamming space. This would help bring down the overall query latency.
For details, check #1827 (comment)
Related Issues
Resolves #1827
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.