Search Use Cases (SRC)
Module Purpose: Enable document discovery through full-text, filtered, and semantic search. This module contains 6 use cases.
Use Case Quick Reference
UC-SRC-001: Full-Text Search
Overview
| Field |
Value |
| ID |
SRC-001 |
| Title |
Full-Text Search |
| Actor |
User |
| Priority |
P1 (MVP Phase 3) |
Description
Search documents by keyword using full-text search index.
Features
| Feature |
Description |
| Keywords |
Match exact words |
| Phrases |
Match exact phrases with quotes |
| Wildcards |
Prefix matching with * |
| Boolean |
AND, OR, NOT operators |
Steps
- Parse search query
- Query Meilisearch index
- Apply relevance ranking
- Return paginated results
{
"query": "invoice payment 2024",
"page": 1,
"limit": 20
}
Output
{
"total": 156,
"page": 1,
"results": [
{
"id": "doc_abc",
"title": "Invoice #12345",
"snippet": "...payment of $5,000 due by January 2024...",
"score": 0.95,
"type": "invoice",
"created_at": "2024-01-10"
}
]
}
Acceptance Criteria
Overview
| Field |
Value |
| ID |
SRC-002 |
| Title |
Filter by Tags |
| Actor |
User |
| Priority |
P1 (MVP Phase 3) |
Description
Filter search results by one or more tags.
{
"query": "payment",
"filters": {
"tags": ["org:Acme Corp", "category:finance"]
}
}
Query Operators
| Operator |
Example |
Meaning |
| AND |
tags:a AND tags:b |
Must have both |
| OR |
tags:a OR tags:b |
Must have either |
| NOT |
NOT tags:a |
Must not have |
Acceptance Criteria
UC-SRC-003: Filter by Classification
Overview
| Field |
Value |
| ID |
SRC-003 |
| Title |
Filter by Classification |
| Actor |
User |
| Priority |
P1 (MVP Phase 3) |
Description
Filter search results by document type and category.
{
"query": "*",
"filters": {
"type": "invoice",
"category": "finance"
}
}
Acceptance Criteria
UC-SRC-004: Filter by Date Range
Overview
| Field |
Value |
| ID |
SRC-004 |
| Title |
Filter by Date Range |
| Actor |
User |
| Priority |
P2 |
Description
Filter search results by creation or upload date.
{
"query": "invoice",
"filters": {
"date_from": "2024-01-01",
"date_to": "2024-03-31"
}
}
Date Fields
| Field |
Description |
| created_at |
Document creation date |
| uploaded_at |
Upload timestamp |
| processed_at |
Processing completion time |
Acceptance Criteria
UC-SRC-005: Semantic Search
Overview
| Field |
Value |
| ID |
SRC-005 |
| Title |
Semantic Search |
| Actor |
User |
| Priority |
P2 (MVP Phase 3) |
Description
Search by meaning using vector similarity, not just keywords.
Steps
- Embed search query using same model as documents
- Query Qdrant for similar embeddings
- Re-rank with recency and other factors
- Return results with similarity scores
{
"query": "documents about contract renewal terms",
"mode": "semantic",
"limit": 10
}
Output
{
"results": [
{
"id": "doc_xyz",
"title": "Master Service Agreement",
"similarity": 0.89,
"snippet": "...automatic renewal unless terminated..."
}
]
}
Acceptance Criteria
UC-SRC-006: Export Search Results
Overview
| Field |
Value |
| ID |
SRC-006 |
| Title |
Export Search Results |
| Actor |
User |
| Priority |
P2 |
Description
Export search results to CSV or JSON for offline analysis.
| Format |
Contents |
| CSV |
ID, Title, Type, Tags, Date |
| JSON |
Full document metadata |
Steps
- Execute search query
- Retrieve all matching documents (up to limit)
- Format as requested
- Return download link
Acceptance Criteria
← Back to Use Cases | Previous: OCR Processing | Next: API →