mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
OptimalService.search / query (via _aggregate_citations) ran each index's plugin.search() sequentially, and every plugin.search re-ran HyDE + embed — so an N-index query made N LLM+embed round-trips in series (~28s across all indexes, even though the SQL is fast). Embed the query ONCE (BaseIndexPlugin.compute_query_embedding) and run every index's vector search concurrently against that single embedding (search_with_embedding + asyncio.gather). The search/query signatures and return contract are unchanged; behavior is identical, just ~Nx fewer embed calls and parallel fetch. Adds a regression test asserting one embed + per-index fan-out.