Skip to content

Conversation

@tupe12334
Copy link

@tupe12334 tupe12334 commented Dec 18, 2025

Summary

Add Redis Open Source with Redis Query Engine as a user-selectable alternative to Qdrant for vector storage in code indexing. This provides users with more flexibility in choosing their vector database backend.

  • Add RedisVectorStore class implementing IVectorStore interface with Redis Query Engine HNSW-based vector search
  • Add vector store provider dropdown in Code Index settings (Qdrant/Redis Open Source)
  • Add Redis configuration fields (URL, password, database number)
  • Add 41 unit tests for RedisVectorStore
  • Maintain backward compatibility by defaulting to Qdrant

Changes

New Files

  • src/services/code-index/vector-store/redis-client.ts - Complete RedisVectorStore implementation
  • src/services/code-index/vector-store/__tests__/redis-client.spec.ts - Unit tests

Modified Files

  • Type definitions updated for vector store provider selection and Redis config
  • Config manager updated to load and validate Redis settings
  • Service factory updated to create RedisVectorStore when provider is "redis"
  • UI updated with vector store provider dropdown and Redis configuration fields
  • Translations added for Redis-related labels and error messages
  • Added ioredis dependency

Features

  • User-selectable: Dropdown to choose between Qdrant and Redis Open Source
  • Redis Query Engine HNSW: Vector similarity search with COSINE distance metric
  • Path segment indexing: Efficient directory-scoped searches
  • Auto-recreation: Index automatically recreated on vector dimension mismatch
  • Backward compatible: Defaults to Qdrant for existing installations

Configuration

When Redis Open Source is selected:

  • Redis URL (default: redis://localhost:6379)
  • Redis Password (optional)
  • Redis Database number (default: 0)

Test plan

  • Unit tests pass (41 tests)
  • TypeScript compilation passes
  • ESLint passes
  • Manual testing with Redis Open Source instance
  • Verify Qdrant still works as default

Related

🤖 Generated with Claude Code

…de indexing

Add Redis Stack with RediSearch as a user-selectable alternative to Qdrant
for vector storage in code indexing. Users can choose between Qdrant and Redis
via a dropdown in the Code Index settings.

## Changes

### New Files
- `src/services/code-index/vector-store/redis-client.ts` - RedisVectorStore
  implementing IVectorStore interface with RediSearch HNSW-based vector search
- `src/services/code-index/vector-store/__tests__/redis-client.spec.ts` - 41
  unit tests for RedisVectorStore

### Modified Files
- Type definitions updated for vector store provider selection and Redis config
- Config manager updated to load and validate Redis settings
- Service factory updated to create RedisVectorStore when provider is "redis"
- UI updated with vector store provider dropdown and Redis configuration fields
- Translations added for Redis-related labels and error messages

## Features
- User-selectable vector store provider (Qdrant or Redis Stack)
- RediSearch HNSW-based vector similarity search with COSINE distance
- Path segment indexing for directory-scoped searches
- Automatic index recreation on vector dimension mismatch
- Backward compatible - defaults to Qdrant for existing installations

## Dependencies
- Added `ioredis` for Redis connectivity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@tupe12334 tupe12334 requested review from cte, jr and mrubens as code owners December 18, 2025 10:35
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. Enhancement New feature or request labels Dec 18, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 18, 2025

Rooviewer Clock   See task on Roo Cloud

Reviewed commit 1eb018b (CI re-run trigger). No code changes since last review. 1 previously flagged issue remains unresolved.

  • Fix cross-platform path segment bug in RedisVectorStore.upsertPoints() - using path.sep fails on Windows when file paths contain forward slashes
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

filePath: point.payload?.filePath || "",
codeChunk: point.payload?.codeChunk || "",
startLine: (point.payload?.startLine ?? 0).toString(),
endLine: (point.payload?.endLine ?? 0).toString(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-platform bug: On Windows, path.sep is \, but file paths from Git and many JavaScript tools use forward slashes. If filePath is "src/components/Button.tsx" on Windows, split(path.sep) produces a single segment ["src/components/Button.tsx"] instead of three, breaking directory-scoped searches.

Suggested change
endLine: (point.payload?.endLine ?? 0).toString(),
const segments = point.payload?.filePath?.split(/[\/\\]/).filter(Boolean) || []

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 18, 2025
tupe12334 and others added 2 commits December 18, 2025 14:25
Add Redis vector store translation keys to all 17 non-English locale files:
- embeddings.json: redisConnectionFailed, redisUrlMissing
- settings.json: vectorStoreProviderLabel, qdrantProvider, redisProvider,
  redisUrlLabel, redisUrlPlaceholder, redisPasswordLabel,
  redisPasswordPlaceholder, redisDatabaseLabel, redisDatabasePlaceholder,
  validation.redisUrlRequired, validation.invalidRedisUrl

Uses English text as placeholder - translations can be provided later.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…ack → Redis Open Source)

Update naming to reflect Redis's current branding:
- "RediSearch" is now "Redis Query Engine"
- "Redis Stack" is now "Redis Open Source"

Updated in:
- redis-client.ts code comments
- redis-client.spec.ts test mock
- All 18 locale embeddings.json files
- All 18 locale settings.json files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@tupe12334 tupe12334 changed the title feat: add Redis Stack (RediSearch) as alternative vector store for code indexing feat: add Redis Open Source (Redis Query Engine) as alternative vector store for code indexing Dec 22, 2025
tupe12334 and others added 2 commits December 22, 2025 19:54
Previously, entering "localhost:6379" (without redis:// prefix) would
parse successfully via new URL() but produce an empty hostname, causing
connection failures. Now the code checks if the parsed hostname is empty
and falls back to simple host:port parsing.

Added tests for simple host:port and host-only URL formats.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants