Add comprehensive semantic search implementation guide - #3002
Conversation
- 11-step implementation guide for hybrid text+vector search - MongoDB Atlas Vector Search integration with Gemini embeddings - Code chunking strategy (220 lines with 40-line overlap) - RRF (Reciprocal Rank Fusion) for merging search results - Background worker for incremental embedding updates - API endpoints and frontend integration examples - Migration script for existing data - Full test examples https://claude.ai/code/session_01VVd75CJr4ZNZnE8Nj6HmAj
🧯 Dangerous deletes guard reportPolicy: see .cursorrules — dangerous deletions are blocked unless wrapped safely. Summary:
Flagged findings (file:line:snippet): Excluded matches (by path pattern) |
⏱️ Performance report(No performance test durations collected. Mark tests with |
📖 Documentation PreviewThe documentation has been built successfully!
To view locally:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:a58cda4ec4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bug fixes: - Add $setWindowFields stages to compute vectorRank/textRank before RRF (was using undefined variables, causing all results to get same score) - Lower min_score from 0.5 to 0.005 (RRF max score is ~0.036) - Convert EmbeddingService to async (httpx.AsyncClient) (was blocking event loop in worker) - Update flags when content unchanged to prevent infinite retry loop - Delete old chunks before checking if new ones exist (prevents stale chunks persisting when embeddings fail) https://claude.ai/code/session_01VVd75CJr4ZNZnE8Nj6HmAj
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Additional bug fixes: - Add missing await for query embedding generation - Add missing await for snippet metadata embedding - Include chunkIndex in $group and $project stages (was returning chunk 0 for all results) - Add ge=10 constraint for CHUNK_SIZE_LINES config - Use max(1, chunk_size // 2) for step fallback (prevents infinite loop when chunk_size is very small) https://claude.ai/code/session_01VVd75CJr4ZNZnE8Nj6HmAj
https://claude.ai/code/session_01VVd75CJr4ZNZnE8Nj6HmAj
Note
Low Risk
Documentation-only change; no runtime code paths are modified.
Overview
Adds a new, comprehensive Hebrew implementation guide (
docs/SEMANTIC_SEARCH_IMPLEMENTATION_GUIDE.md) describing how to add semantic/hybrid code search to CodeBot.The guide documents proposed DB schema/index changes, an async Gemini-based embedding service, code chunking, a hybrid MongoDB Atlas text+vector query with RRF ranking fixes/thresholds, a background embedding worker, an API endpoint, frontend wiring, migration steps, and example tests/config/env vars.
Written by Cursor Bugbot for commit 35a6798. This will update automatically on new commits. Configure here.