vk_hackathon/search
q d2e531cc07 Speed up: preload BM25 at startup, httpx timeout+limits, fix lambda in to_thread
- index: lifespan preloads BM25 model so first /sparse_embedding request
  doesn't pay cold-start cost (~1-2s per worker)
- search: same BM25 preload + httpx timeout=30s + connection limits to
  avoid hanging on slow external APIs
- search: asyncio.to_thread(fn, arg) instead of lambda wrapper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 20:04:20 +03:00
..
__init__.py Refactor index and search services 2026-04-18 13:57:15 +03:00
aggregation.py Add logviewer project and fix Docker imports 2026-04-18 15:26:11 +03:00
config.py Refactor index and search services 2026-04-18 13:57:15 +03:00
Dockerfile Port index and search logic from working Lotus reference implementation 2026-04-18 18:32:41 +03:00
main.py Speed up: preload BM25 at startup, httpx timeout+limits, fix lambda in to_thread 2026-04-18 20:04:20 +03:00
Makefile Fix date_range filter: use DatetimeRange for RFC3339 strings; set TEAM_ID=35230 in Makefiles, add release target 2026-04-18 16:26:14 +03:00
query_builder.py Clean up search: proper retry loop, batch embedding, remove duplicate wrapper 2026-04-18 16:50:34 +03:00
requirements.txt Source VK code 2026-04-18 10:51:43 +03:00
rerank.py Clean up search: proper retry loop, batch embedding, remove duplicate wrapper 2026-04-18 16:50:34 +03:00
retrieval.py Fix date_range filter: use DatetimeRange for RFC3339 strings; set TEAM_ID=35230 in Makefiles, add release target 2026-04-18 16:26:14 +03:00
schemas.py Refactor index and search services 2026-04-18 13:57:15 +03:00