Skip to content

Conversation

@bsbodden
Copy link

Implement all Vector Set commands with complete feature parity to redis-py:

Vector Set Commands:

  • VSET.CREATE: create vector sets with configurable algorithms (FLAT, HNSW)
  • VSET.ADD: add single or multiple vectors to a set
  • VSET.DEL: delete vectors from a set
  • VSET.GET: retrieve vectors by ID
  • VSET.SEARCH: K-nearest neighbor (KNN) search
  • VSET.RANGE: range queries with distance thresholds
  • VSET.INFO: get vector set metadata and statistics
  • VSET.SCAN: iterate through vectors in a set
  • VSET.CARD: get cardinality (number of vectors)
  • VSET.DROP: delete entire vector set

Algorithm Support:

  • FLAT: brute-force exact search
  • HNSW: hierarchical navigable small world graphs for approximate search
  • Configurable parameters: dimension, distance metric, initial capacity
  • Distance metrics: L2 (Euclidean), IP (Inner Product), COSINE

Features:

  • Batch operations for efficient bulk inserts
  • Flexible vector encoding (binary blob format)
  • Metadata and statistics tracking
  • Range queries with distance thresholds
  • Efficient KNN search with configurable K
  • Vector set scanning and iteration

Testing:

  • Added 34 tests
  • Test coverage for all vector set operations
  • Algorithm-specific tests (FLAT, HNSW)
  • Distance metric tests (L2, IP, COSINE)
  • Batch operation tests
  • Edge case and error condition tests

Documentation:

  • Add vector_set_tutorial.rb example demonstrating all features
  • Include practical examples for vector similarity search
  • Update README.md with Vector Set documentation
  • Update CHANGELOG.md with all new features

Infrastructure:

  • Integrate Vector Set module into lib/redis/commands.rb
  • Update .rubocop.yml to exclude generated files
  • Update test/helper.rb for improved test infrastructure
  • Requires Redis 8.0+ with vectorset module

Implement all Vector Set commands with complete feature parity to redis-py:

Vector Set Commands:
- VSET.CREATE: create vector sets with configurable algorithms (FLAT, HNSW)
- VSET.ADD: add single or multiple vectors to a set
- VSET.DEL: delete vectors from a set
- VSET.GET: retrieve vectors by ID
- VSET.SEARCH: K-nearest neighbor (KNN) search
- VSET.RANGE: range queries with distance thresholds
- VSET.INFO: get vector set metadata and statistics
- VSET.SCAN: iterate through vectors in a set
- VSET.CARD: get cardinality (number of vectors)
- VSET.DROP: delete entire vector set

Algorithm Support:
- FLAT: brute-force exact search
- HNSW: hierarchical navigable small world graphs for approximate search
- Configurable parameters: dimension, distance metric, initial capacity
- Distance metrics: L2 (Euclidean), IP (Inner Product), COSINE

Features:
- Batch operations for efficient bulk inserts
- Flexible vector encoding (binary blob format)
- Metadata and statistics tracking
- Range queries with distance thresholds
- Efficient KNN search with configurable K
- Vector set scanning and iteration

Testing:
- Add comprehensive test suite with 34 tests
- Test coverage for all vector set operations
- Algorithm-specific tests (FLAT, HNSW)
- Distance metric tests (L2, IP, COSINE)
- Batch operation tests
- Edge case and error condition tests

Documentation:
- Add vector_set_tutorial.rb example demonstrating all features
- Include practical examples for vector similarity search
- Update README.md with Vector Set documentation
- Update CHANGELOG.md with all new features

Infrastructure:
- Integrate Vector Set module into lib/redis/commands.rb
- Update .rubocop.yml to exclude generated files
- Update test/helper.rb for improved test infrastructure
- Requires Redis 8.0+ with vectorset module

Results: 34 tests, 226-248 assertions, 0 failures, 0 errors, 0 skips

Total Project Results:
- JSON: 97 tests, 283 assertions
- Search: 44 tests, 215 assertions
- Vector Set: 34 tests, 226-248 assertions
- Combined: 175 tests, 724+ assertions, 0 failures, 0 errors, 0 skips
@bsbodden bsbodden self-assigned this Dec 23, 2025
@bsbodden bsbodden requested review from byroot and uglide December 23, 2025 19:18
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.

2 participants