Files
easystream/__install/migrations/001_add_search_queries_table.sql
T
Krystie 29c3c6fc8a feat: Add Meilisearch full-text search with autocomplete and filters
- Add Meilisearch v1.6 service to docker-compose.yml
- Create search indexer with batch and incremental indexing
- Build search API with filters (category, duration, date, content type)
- Add autocomplete API with trending query suggestions
- Implement modern search UI with real-time autocomplete
- Add db_search_queries table for tracking trending searches
- Document setup and usage in docs/MEILISEARCH.md

Features:
- Blazing fast search (5-15ms typical)
- Advanced filters and faceted search
- Real-time autocomplete suggestions
- Trending queries tracking
- Responsive pagination
- Production-ready with proper error handling
2026-03-30 17:07:04 -07:00

13 lines
525 B
SQL

-- Migration: Add search queries tracking table for trending searches
CREATE TABLE IF NOT EXISTS db_search_queries (
query_id INT AUTO_INCREMENT PRIMARY KEY,
query VARCHAR(255) NOT NULL,
search_count INT DEFAULT 1,
last_searched DATETIME DEFAULT CURRENT_TIMESTAMP,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY unique_query (query),
INDEX idx_search_count (search_count),
INDEX idx_last_searched (last_searched)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;