Skip to content

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 force-pushed the vector-sets branch 2 times, most recently from 22fb9ab to f528045 Compare June 18, 2025 08:08
@nkaradzhov nkaradzhov marked this pull request as ready for review June 18, 2025 17:06
@nkaradzhov nkaradzhov merged commit c5b4f47 into redis:master Jun 24, 2025
14 checks passed
@nkaradzhov nkaradzhov deleted the vector-sets branch June 24, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants