DocsSearch
Deduplication Strategy
On this page
The same conversation content can appear multiple times due to:
- Agent file rewrites
- Backup files
- Symlinked directories
- Re-indexing
Content-Based Deduplication#
cass uses a multi-layer deduplication strategy:
-
Message identity: messages are keyed by
UNIQUE(conversation_id, idx). Appends to a known conversation useINSERT OR IGNORE, and a new conversation's batchedINSERThas the same unique index as its backstop, so re-indexing the same file never stores a message twice- No content hash is persisted for this; BLAKE3 content hashes are computed in memory only, as merge fingerprints when an updated file is reconciled against stored rows
-
Conversation identity: conversations are keyed by
UNIQUE(source_id, agent_id, external_id)- There is no fingerprint built from message hashes; the same external id from the same source and agent is the same conversation
-
Search-Time Dedup: hits are deduplicated on an exact key tuple —
(source, source path, conversation id or title, line number, created_at,— keeping the highest-scored hitwhitespace-invariant content hash)- Identical content from different sources stays visible as separate results; tool-invocation noise is filtered
Noise Filtering#
Common low-value content is filtered from results:
- Empty messages
- Pure whitespace
- System prompts (unless searching for them)
- Repeated tool acknowledgments