SurfSense/surfsense_backend/app/retriever
Tim Ren 0269900c60 fix: use asyncio.to_thread for embedding calls in search endpoints
Wrap synchronous embedding_model.embed() calls with asyncio.to_thread()
in both vector_search and hybrid_search methods. This prevents blocking
the asyncio event loop during embedding computation, improving server
responsiveness under concurrent load.

Fixes #794

Signed-off-by: Tim Ren <137012659+xr843@users.noreply.github.com>
2026-03-15 16:21:19 +08:00
..
__init__.py fix(backend): rename retriver directory to retriever 2025-12-06 22:21:30 +05:30
chunks_hybrid_search.py fix: use asyncio.to_thread for embedding calls in search endpoints 2026-03-15 16:21:19 +08:00
documents_hybrid_search.py feat: implement batch unread counts for notifications to reduce API calls and improve performance 2026-03-10 01:26:37 -07:00