generated from cording12/next-fast-turbo
-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
Currently, there are two issues in
chunks_hybrid_search.py :
- Typo: The class is named
ChucksHybridSearchRetrieverinstead ofChunksHybridSearchRetriever.
| class ChucksHybridSearchRetriever: | |
| def __init__(self, db_session): |
- Lack of Error Handling:
The embedding_model.embed(query_text) call is not wrapped in a try-except block. If the embedding service (e.g. OpenAI or Azure) fails or times out, the entire request crashes with a 500 error instead of gracefully falling back to keyword search.
SurfSense/surfsense_backend/app/retriever/chunks_hybrid_search.py
Lines 35 to 43 in 8c60910
| from sqlalchemy import select | |
| from sqlalchemy.orm import joinedload | |
| from app.config import config | |
| from app.db import Chunk, Document | |
| # Get embedding for the query | |
| embedding_model = config.embedding_model_instance | |
| query_embedding = embedding_model.embed(query_text) |
Deployment Type
- SurfSense Cloud (hosted version)
- Self-hosted version
Steps to Reproduce
Expected Behavior
- Rename class to
ChunksHybridSearchRetriever. - Catch exceptions during embedding generation. If it fails, log the error and retry or skip vector search , so that keyword search can still work.
I am happy to contribute a pull request to fix these issues once they are confirmed by the maintainers.
Actual Behavior
Screenshots/Videos
Environment Information
- Browser: Chrome 144
- Operating System: macOS 15
- SurfSense Version: self-hosted(latest version)
Additional Environment Details (for Self-hosted only)
- Python Version: [3.12.11]
- Node.js Version: [25.5.0]
- Database: [PostgreSQL 16]
- Deployment Method: [Docker]
Additional Context
Logs/Error Messages
Paste logs here
Checklist
- I have searched existing issues to ensure this is not a duplicate
- I have provided all the required information above
- I have added appropriate labels (bug, deployment type)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working