-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Currently, when indexing a repository, the indexer creates the main index and _settings index, but does not create a -repo alias. This requires users to manually create aliases for the MCP server to discover indices, which is a poor user experience.
Solution
Automatically create a <indexName>-repo alias pointing to the main index when:
- A new index is created
- An existing index is used (for backward compatibility with already-indexed repos)
Implementation
-
Add
createRepoAlias()function that:- Creates alias with pattern
<indexName>-repo - Checks if alias already exists (idempotent)
- Verifies index exists before creating alias
- Handles errors gracefully (non-blocking)
- Creates alias with pattern
-
Integrate into
createIndex():- Call
createRepoAlias()after successful index creation - Also call for existing indices to ensure aliases are created retroactively
- Call
Benefits
✅ Works seamlessly with MCP server's alias-based discovery (primary strategy)
✅ No manual steps required for users
✅ Backward compatible (creates aliases for existing indices)
✅ Non-blocking (alias creation failures don't break indexing)
✅ Complements the MCP server's _settings fallback strategy
Related
This complements the MCP server improvement in:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request