Search System
The Platform Search System provides a unified global search experience across all entity types (Datasets, Checks, Workflows, Issues) within the platform, with support for keyword, semantic, and hybrid search modes.
Architecture
1. Unified Indexing
Search is not just a database query; it involves a specialized indexing strategy.
- SearchService: Orchestrates queries across multiple domains.
- Optimization: We use optimized SQL queries (potentially leveraging Full Text Search features of PostgreSQL) to retrieve results efficiently.
- Embeddings: Products are vectorized via
EmbeddingService(localsentence-transformersby default, or OpenAI) for semantic similarity search.
2. Search Modes
The API accepts a mode query parameter:
| Mode | Strategy |
|---|---|
auto | (default) Keyword search + semantic results when embeddings are available |
keyword | Elasticsearch / PostgreSQL full-text only |
semantic | Vector-similarity (cosine) using pre-computed embeddings |
3. Keyboard Navigation (Cmd+K)
The frontend implements a "Command Palette" pattern.
- Global Listener: Listens for
Cmd+K(orCtrl+K) to open the search modal. - Context Aware: The search can theoretically benefit from context (e.g., current space), but primarily functions as a global discovery tool.
Multi-Entity Discovery
The search result model is polymorphic.
- Results: A list of
SearchResultobjects. - Type Discrimination: Each result includes a
typefield (e.g.,dataset,quality_check,workflow) to separate rendering logic in the UI.
Navigation
Clicking a result uses the Standard #330-ContextLink pattern to ensure the user is navigated to the correct location, preserving necessary context (like the active tab or filter settings).