Repository navigation
feat: unified search across memories and documents (#531) - #532
Merged
Merged
Conversation
🔍 Cora AI Code Review❌ Blocked — critical issues found. 🔴 Error (4)
Review powered by cora-cli · BYOK · MIT |
Bridge recall and doc search into a single query surface via client-side RRF merge. No schema changes, zero migration risk. - Add UnifiedSearchResult, SearchResultType, SearchType types - Add recall_unified() to Uteke (core) with 3 modes: - All (default): memories + documents merged via RRF - Memory: memories only (backward compatible) - Document: documents only - CLI: --type flag (all|memory|doc) on recall command - CLI: [mem]/[doc] labels in human output - MCP: uteke_recall now returns unified results with type field - API: POST /recall accepts optional search_type parameter - Tests: serde roundtrip, type defaults, field serialization Fixes from original PR: - Remove clap::ValueEnum from uteke-core (no clap dep) — use String in CLI - Rename test is_numbered_list → test_numbered_list (shadows free fn) - Apply min_score in recall_unified_all (Cora review) - Entity/category filters force legacy memory-only path (Cora review) - Fix serde test assertions: use "document" not "doc", "result_type" not "type" - Rustfmt all files Breaking: none — --type defaults to 'all' but falls back to memory-only path when memory-specific flags are used (--at, --related, --salience, --recency, --entity, --category, --where).
ajianaz
force-pushed
the
feat/unified-search-531
branch
from
July 3, 2026 14:32
a24070c to
eedd3e2
Compare
- recall_unified_documents now accepts and applies min_score filter (previously ignored, causing functional inconsistency) - recall_unified_all: replace unwrap_or_default() with match + tracing::warn so backend failures produce log entries instead of silent empty results (partial degradation is intentional — one source failing shouldn't block the other)
|
|
||
| // When --type is explicitly set (not default unified), route to recall_unified. | ||
| // When unified (default), use existing recall path for backward compat with | ||
| // --strategy, --at, --related, --salience, --recency, --entity, --category, --where flags |
| namespace: Option<&str>, | ||
| min_score: f32, | ||
| search_type: SearchType, | ||
| ) -> Result<Vec<UnifiedSearchResult>, Error> { |
| } else { | ||
| dr.chunk_snippet.clone() | ||
| }, | ||
| memory_id: None, |
| && point_in_time.is_none() | ||
| && !has_meta_filter | ||
| { | ||
| let search_type = match req_data.search_type.as_deref() { |
ajianaz
added a commit
that referenced
this pull request
Aug 13, 2026
feat: unified search across memories and documents (#531)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bridge
uteke recallanduteke doc searchinto a single query surface via client-side RRF merge. No schema changes, zero migration risk.Closes #531
Problem
uteke recallsearches memories,uteke doc searchsearches documents — two separate commands, two separate result sets. Agents need to know where data lives, adding cognitive overhead to every query.Solution
Client-side merge at the query layer:
Changes
uteke-core/src/memory/types.rsUnifiedSearchResult,SearchResultType,SearchTypetypes + testsuteke-core/src/memory/mod.rsuteke-core/src/lib.rsrecall_unified()with 3 modes (all/memory/document)uteke-cli/src/cli.rs--typeflag to Recall command (String, no clap dep)uteke-cli/src/commands/recall.rs--typeis setuteke-cli/src/commands/mod.rs--typeto recall handleruteke-cli/src/output.rsprint_unified_human()with[mem]/[doc]labelsuteke-mcp/src/lib.rsuteke_recallMCP tool returns unified resultsuteke-server/src/types.rssearch_typetoRecallRequestuteke-server/src/handlers.rsrecall_unifiedwhensearch_typeis providedAPI
Backward Compatibility
--type all(default) only activates unified path when no memory-specific flags are used--at,--related,--salience,--recency,--entity,--category,--where→ falls back to memory-only pathuteke doc searchcommand unchangeduteke_recallresponse includesresult_typefield for distinctionAcceptance Criteria from #531
uteke recall "query" --namespace Nreturns both memories and documents by defaultuteke recall "query" --type memoryreturns memories onlyuteke recall "query" --type docreturns documents onlyuteke_recallreturns unified results with type fieldPOST /recallaccepts optionalsearch_typeparameteruteke doc searchcontinues to work independentlyTesting