Search cannot serve a backend: no token, no scores, no paging, no filter
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- api, authorization, search
Research direction
Start with the rrf_fuse fusion step and the POST /kbs/{id}/search route, which the issue names as the entry points, and check where the full-text index stores document_id. The issue is a set of separate PRs (scores and paging, token access, filters, MCP search_chunks), so take one piece at a time and read the existing search tests before changing them. Done means the route returns fused scores, per-arm ranks, has_more and vector_used, and the filters narrow both arms, with each piece covered by a test.
Written by the indexing model from the issue text.
Description
We want a backend to search a base the way the chat does: hybrid full-text and vector retrieval, fused by rank. POST /kbs/{id}/search is close, but four things stop a service from using it:
- It takes a session JWT only; a personal token gets 401.
- It returns chunks without scores or ranks, so a caller cannot blend the results with its own or tell a strong hit from a weak one, and it cannot tell when the vector arm was skipped (no embedding model, or the call failed) because the fallback to full-text only is silent.
- There is no paging:
top_kand nothing else. - It searches the whole base. A base that holds several kinds of documents (code, docs, a memory log), each in its own source, cannot be searched one kind at a time.
Proposal, as small PRs:
- scores:
rrf_fusekeeps the fused score and each arm's rank; the route returns them withsource_id,external_id,has_moreandvector_used, takesoffset, capstop_kat 50, and accepts a token (read scope,kb_idsnarrowing, as document content does) - filters:
source_ids,filename_prefix,external_id_prefix,exclude_missing, pushed into both arms through the document ids they allow (the full-text index already storesdocument_id, so no reindex) - the same filters and scores on MCP
search_chunks
- Dominant language
- Rust
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 21h 2m
- Merged PRs (30d)
- 263
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deeplethe/utopia
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 56/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
deeplethe/utopia#1341 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 5/5 Over a week Newbie friendliness 48/100
deeplethe/utopia#1338 · 2 comments ·
Maintainers usually reply within 1 day
All issues in deeplethe/utopia
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
compiler P4 perf
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
HerringtonDarkholme/hd-lang#1044 ·
Maintainers usually reply within 1 day
-
good first issue help wanted r-docs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
servo/rust-smallvec#824 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
akitaonrails/ai-usagebar#552 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100