Skip to content

Commit 895b73e

Browse files
jsbattigclaude
andcommitted
fix: Multi-repo FTS and temporal search bugs
- FTS: Fixed incorrect directory path (fts-index → tantivy_index) - Temporal: Added missing embedding_provider and collection_name parameters to TemporalSearchService initialization Both bugs caused multi-repo search endpoints to fail: - FTS returned "FTS index not found" despite indexes existing - Temporal returned "not fully initialized" error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 618bca0 commit 895b73e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/code_indexer/server/multi/multi_search_service.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ async def _execute_parallel_search(
158158

159159
# Aggregate results with optional score filtering
160160
aggregator = MultiResultAggregator(
161-
limit=request.limit,
162-
min_score=request.min_score
161+
limit=request.limit, min_score=request.min_score
163162
)
164163
aggregated_results = aggregator.aggregate(repo_results)
165164

@@ -286,8 +285,8 @@ def _search_fts_sync(
286285
# Get repository path
287286
repo_path = self._get_repository_path(repo_id)
288287

289-
# FTS index is in .code-indexer/fts-index
290-
fts_index_dir = PathLib(repo_path) / ".code-indexer" / "fts-index"
288+
# FTS index is in .code-indexer/tantivy_index
289+
fts_index_dir = PathLib(repo_path) / ".code-indexer" / "tantivy_index"
291290

292291
if not fts_index_dir.exists():
293292
raise FileNotFoundError(
@@ -356,25 +355,32 @@ def _search_temporal_sync(
356355
)
357356
from ...config import ConfigManager
358357
from ...storage.filesystem_vector_store import FilesystemVectorStore
358+
from ...services.embedding_factory import EmbeddingProviderFactory
359359

360360
try:
361361
# Get repository path
362362
repo_path = PathLib(self._get_repository_path(repo_id))
363363

364364
# Load repository configuration
365365
config_manager = ConfigManager.create_with_backtrack(repo_path)
366+
config = config_manager.get_config()
366367

367368
# Initialize vector store for temporal search
368369
index_dir = repo_path / ".code-indexer" / "index"
369370
vector_store_client = FilesystemVectorStore(
370371
base_path=index_dir, project_root=repo_path
371372
)
372373

374+
# Create embedding provider for temporal search
375+
embedding_provider = EmbeddingProviderFactory.create(config, console=None)
376+
373377
# Create temporal service
374378
temporal_service = TemporalSearchService(
375379
config_manager=config_manager,
376380
project_root=repo_path,
377381
vector_store_client=vector_store_client,
382+
embedding_provider=embedding_provider,
383+
collection_name=TemporalSearchService.TEMPORAL_COLLECTION_NAME,
378384
)
379385

380386
# Check if temporal index exists

0 commit comments

Comments
 (0)