Skip to content

Vector sets #2998

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Vector sets #2998

wants to merge 17 commits into from

Conversation

nkaradzhov
Copy link
Collaborator

@nkaradzhov nkaradzhov commented Jun 16, 2025

Add Redis Vector Set Commands Support

Overview

This PR implements Redis Vector Set commands (Redis 8.0+), adding 13 new commands with TypeScript support, test coverage, and RESP2/RESP3 protocol compatibility.

New Commands

Command Description
VADD Add vectors to a set
VCARD Get vector set cardinality
VDIM Get vector dimensions
VEMB Get element embeddings
VEMB_RAW Get raw element embeddings
VGETATTR Get element attributes
VINFO Get vector set metadata
VLINKS Get HNSW graph connections
VLINKS_WITHSCORES Get connections with scores
VRANDMEMBER Get random elements
VREM Remove elements
VSETATTR Set element attributes
VSIM Vector similarity search
VSIM_WITHSCORES Similarity search with scores

JSON Helper Functions Relocation

  • Moved RedisJSON utilities from packages/json/lib/commands/helpers.ts to packages/client/lib/commands/generic-transformers.ts
  • Updated all import statements in JSON package
  • JSON package re-exports helpers for backward compatibility

Protocol Support

  • RESP2: Standard array/numeric responses
  • RESP3: Boolean returns for VSETATTR, Map returns for VSIM_WITHSCORES

Testing

  • Added test files for all 14 commands
  • Tests cover argument parsing, integration testing, and RESP2/RESP3 compatibility
  • Tests run against Redis 8.0.2 Docker container

@nkaradzhov nkaradzhov marked this pull request as ready for review June 18, 2025 17:06
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