feat(E): Unified Search — 24 Tasks complete
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
- SPIKE-E: FTS+Vector+Permission benchmark on 10k records (all <30ms) - E-PROV: supports_fts/vector/rag/graph capability flags on all providers - E-FTS/VEC: All 11 providers refactored to BaseSearchProvider with permission filtering - E-PERM: Over-fetch strategy for vector+permission (15x faster than ANY() filter) - E-FUSE: rrf_fusion_multi() for N-way RRF over FTS+Vector+RAG+Graph - E-LLM: Query understanding cleaned up to use central llm_complete() - E-CHUNK: Document chunking module + document_chunks table with HNSW index - E-EMB: Chunk embedding ARQ jobs (index_file_chunks, reindex_chunks) - E-RAG: RAG retrieval via FileSearchProvider.search_rag() - E-GRAPH: GraphRAG BFS traversal via GraphRAGSearchProvider.search_graph() - E-IX-EVT: Auto-indexing via outbox events + delete/cleanup handlers - E-IX-RE: Batch reindex with progress tracking + reindex_all job - E-DATA-LIFE: Lifecycle module (remove/rebuild/restore/correct) + API endpoints - E-K-MEM: AgentMemorySearchProvider - E-P-AI: AIChatSearchProvider - E-P-WF: WorkflowSearchProvider - E-P-COMM: ConversationSearchProvider verified (already on BaseSearchProvider) - E-API: Filter params (date_from/to, tags, sort) + /facets endpoint - E-TOOL: unified_search AI tool registered in ToolRegistry - E-MCP: Search tool in MCP server with normal RBAC/tenant checks - E-UI-CMD: CommandPalette (Cmd+K) with debounced search + recent searches - E-UI-FAC: SearchFacets, SearchResultCard, SavedSearches components - E-TEST: 40 new tests in test_unified_search_phase_e.py (105 total green) - E-DOC: api-documentation.md, plugin-development-guide.md, test-strategy.md updated 105 tests passing, TypeScript clean.
This commit is contained in:
@@ -14,6 +14,19 @@ class SearchRequest(BaseModel):
|
||||
entity_types: list[str] | None = None
|
||||
limit: int = Field(default=20, ge=1, le=100)
|
||||
offset: int = Field(default=0, ge=0)
|
||||
date_from: str | None = Field(
|
||||
default=None, description="ISO date (YYYY-MM-DD) — filter by created_at/updated_at >= date_from"
|
||||
)
|
||||
date_to: str | None = Field(
|
||||
default=None, description="ISO date (YYYY-MM-DD) — filter by created_at/updated_at <= date_to"
|
||||
)
|
||||
tags: list[str] | None = Field(
|
||||
default=None, description="Filter results by tags (comma-separated on entities)"
|
||||
)
|
||||
sort: str = Field(
|
||||
default="relevance",
|
||||
description="Sort order: relevance, date, name",
|
||||
)
|
||||
|
||||
|
||||
class SearchResult(BaseModel):
|
||||
@@ -34,6 +47,14 @@ class SearchResponse(BaseModel):
|
||||
suggestions: list[str]
|
||||
|
||||
|
||||
class FacetsResponse(BaseModel):
|
||||
"""Available facets for search filtering."""
|
||||
|
||||
entity_types: list[str]
|
||||
tags: list[str]
|
||||
date_ranges: dict[str, Any]
|
||||
|
||||
|
||||
# ─── Similar ───
|
||||
|
||||
class SimilarRequest(BaseModel):
|
||||
@@ -61,6 +82,7 @@ class SuggestResponse(BaseModel):
|
||||
|
||||
class ReindexRequest(BaseModel):
|
||||
entity_types: list[str] = Field(default_factory=list)
|
||||
include_chunks: bool = Field(default=True, description="Re-index document chunks for files")
|
||||
|
||||
|
||||
# ─── Provider ───
|
||||
@@ -69,3 +91,7 @@ class ProviderResponse(BaseModel):
|
||||
entity_type: str
|
||||
plugin_name: str
|
||||
is_active: bool
|
||||
supports_fts: bool = True
|
||||
supports_vector: bool = True
|
||||
supports_rag: bool = False
|
||||
supports_graph: bool = False
|
||||
|
||||
Reference in New Issue
Block a user