Skip to content

Fix HASH vector fetch decoding and score normalization#2

Open
sagile wants to merge 3 commits intomainfrom
fix/fetch-vectors-normalized-scores
Open

Fix HASH vector fetch decoding and score normalization#2
sagile wants to merge 3 commits intomainfrom
fix/fetch-vectors-normalized-scores

Conversation

@sagile
Copy link
Copy Markdown
Collaborator

@sagile sagile commented Apr 30, 2026

Summary

  • decode HASH-stored vector fields on fetch so callers get logical number[] values instead of raw binary-looking payloads
  • normalize vector search scores using the query alias and schema metric so normalizeDistance: true returns similarity-style scores consistently
  • add unit and integration coverage for both the fetch round-trip and the manual smoke normalization flow

Validation

  • npm run format:check
  • npm run lint
  • npm run type-check
  • npm run build
  • npm run test -- tests/unit/indexes/search-index.test.ts
  • npm run test -- tests/integration/search-index.test.ts

CI Notes

  • Reviewed .github/workflows/lint.yml and ran the local equivalents: npm run format:check, npm run lint, and npm run type-check
  • Reviewed .github/workflows/test.yml and ran focused local equivalents for the changed surface: npm run build, npm run test -- tests/unit/indexes/search-index.test.ts, and npm run test -- tests/integration/search-index.test.ts
  • The PR workflow also runs broader test-matrix jobs (tests/unit, tests/integration, full npm test) on Node 22/24 and Redis variants; those were not fully re-run locally because the touched surface is narrower than the full matrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant