Skip to content

Add Hamming distance scorer for byte vectors in VectorScorers#3214

Merged
VijayanB merged 1 commit intoopensearch-project:mainfrom
VijayanB:update-scorers
Mar 26, 2026
Merged

Add Hamming distance scorer for byte vectors in VectorScorers#3214
VijayanB merged 1 commit intoopensearch-project:mainfrom
VijayanB:update-scorers

Conversation

@VijayanB
Copy link
Copy Markdown
Member

@VijayanB VijayanB commented Mar 26, 2026

Description

  • Route SpaceType.HAMMING to a dedicated createHammingScorer via
    FlatVectorsScorerProvider for memory-optimized binary vector search
  • Propagate fieldInfo to byte-target createScorer APIs for
    space-type-aware scorer resolution

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@VijayanB VijayanB force-pushed the update-scorers branch 2 times, most recently from 28935d7 to 8520544 Compare March 26, 2026 07:07
- Route SpaceType.HAMMING to a dedicated createHammingScorer via
  FlatVectorsScorerProvider for memory-optimized binary vector search
- Propagate fieldInfo to byte-target createScorer APIs for
  space-type-aware scorer resolution

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.10%. Comparing base (1a3acb9) to head (c7f8cba).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nsearch/knn/index/query/scorers/VectorScorers.java 92.85% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3214      +/-   ##
============================================
- Coverage     83.10%   83.10%   -0.01%     
- Complexity     4207     4209       +2     
============================================
  Files           453      453              
  Lines         15439    15450      +11     
  Branches       1971     1972       +1     
============================================
+ Hits          12831    12839       +8     
- Misses         1813     1816       +3     
  Partials        795      795              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@VijayanB VijayanB merged commit 37ae810 into opensearch-project:main Mar 26, 2026
59 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 27, 2026
- Route SpaceType.HAMMING to a dedicated createHammingScorer via
  FlatVectorsScorerProvider for memory-optimized binary vector search
- Propagate fieldInfo to byte-target createScorer APIs for
  space-type-aware scorer resolution

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
(cherry picked from commit 37ae810)
VijayanB added a commit that referenced this pull request Mar 27, 2026
- Route SpaceType.HAMMING to a dedicated createHammingScorer via
  FlatVectorsScorerProvider for memory-optimized binary vector search
- Propagate fieldInfo to byte-target createScorer APIs for
  space-type-aware scorer resolution

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
(cherry picked from commit 37ae810)
VijayanB added a commit that referenced this pull request Mar 30, 2026
…#3218)

- Route SpaceType.HAMMING to a dedicated createHammingScorer via
  FlatVectorsScorerProvider for memory-optimized binary vector search
- Propagate fieldInfo to byte-target createScorer APIs for
  space-type-aware scorer resolution


(cherry picked from commit 37ae810)

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
Co-authored-by: Vijayan Balasubramanian <balasvij@amazon.com>
Co-authored-by: Naveen Tatikonda <navtat@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants