Replies: 2 comments
|
@ramteid Please let me know if this will solve the issue, or if I'm missing something. |
|
I agree — A few things worth noting from my code review: Your proposal is sound as-is. Keeping the folder in the The Skip permission mutation entirely. The current branch merges permissions from all duplicates into the winner. This is dead code — both fulltext ( The embedding cloning question remains. Removing One race condition to accept: if two sources sync simultaneously, both workers may check Regarding the Rust Suggested implementation scope:
That's 5 files, no migration, no schema change, no SDK change. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Cross-source IMAP thread dedup
Problem
Two IMAP accounts subscribed to the same mailing list produce separate
documentsrows because today'sexternal_idbakessource_idin. Search returns near-duplicates with different scores - bad UX.Proposal
Connector (
connectors/imap/src/models.rs:164): dropsource_idfrommake_thread_document_id.Folder stays (keeps Gmail's
INBOXvs[Gmail]/All Maildistinct). Source goes — same thread across two accounts now produces the sameexternal_idbut distinct rows (differentsource_id). The(source_id, external_id)UNIQUE constraint handles the rest. No schema change.Searcher (
services/searcher/src/search.rs): replacededuplicate_cross_sourcewith:3 × limit, capped).external_id- we will have to decide for which rows we do this, can't do for all or we risk losing legitimate resultsupdated_at). Attribution list viaalso_in: [{source_id, document_id, score}, …]. Don't mutate permissions - kept row is permitted by step 2.limit.Out of scope
Content-blob dedup (byte-identical, simhash) and cross-connector entity dedup are separate concerns.
Caveats
Related PR: #149
All reactions