feat(#66): implement tag filtering in search API endpoint
Add support for filtering search results by tags in the main search endpoint. Changes: - Add tags parameter to SearchQueryDto (comma-separated tag slugs) - Implement tag filtering in SearchService.search() method - Update SQL query to join with knowledge_entry_tags when tags provided - Entries must have ALL specified tags (AND logic) - Add tests for tag filtering (2 controller tests, 2 service tests) - Update endpoint documentation - Fix non-null assertion linting error The search endpoint now supports: - Full-text search with ranking (ts_rank) - Snippet generation with highlighting (ts_headline) - Status filtering - Tag filtering (new) - Pagination Example: GET /api/knowledge/search?q=api&tags=documentation,tutorial All tests pass (25 total), type checking passes, linting passes. Fixes #66 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
"dev": "turbo run dev",
|
||||
"dev:api": "turbo run dev --filter @mosaic/api",
|
||||
"dev:web": "turbo run dev --filter @mosaic/web",
|
||||
"dev:orchestrator": "turbo run dev --filter @mosaic/orchestrator",
|
||||
"lint": "turbo run lint",
|
||||
"lint:fix": "turbo run lint:fix",
|
||||
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
|
||||
@@ -24,6 +27,10 @@
|
||||
"docker:up": "docker compose up -d",
|
||||
"docker:down": "docker compose down",
|
||||
"docker:logs": "docker compose logs -f",
|
||||
"docker:logs:api": "docker compose logs -f api",
|
||||
"docker:logs:web": "docker compose logs -f web",
|
||||
"docker:logs:orchestrator": "docker compose logs -f orchestrator",
|
||||
"docker:logs:coordinator": "docker compose logs -f coordinator",
|
||||
"docker:ps": "docker compose ps",
|
||||
"docker:build": "docker compose build",
|
||||
"docker:restart": "docker compose restart",
|
||||
|
||||
Reference in New Issue
Block a user