docs: update README with search feature documentation

- Document search capabilities in Media Management section
- Add API endpoint documentation for /api/media-items/search
- Include search behavior, ranking, and examples
- Document fuzzy search fallback for typos
This commit is contained in:
2026-01-29 20:21:08 -05:00
parent cec0b17bde
commit ba92b86e67
+30
View File
@@ -44,6 +44,12 @@ A modern self-hosted media library system built with Go, PostgreSQL, HTMX, and T
- **Universal Media Support**: Single system for all media types with unified interface - **Universal Media Support**: Single system for all media types with unified interface
- **Rich Metadata**: Automatic extraction of title, author, series, publisher, ISBN, tags - **Rich Metadata**: Automatic extraction of title, author, series, publisher, ISBN, tags
- **ISBN Normalization**: Automatic ISBN format normalization (removes hyphens and spaces) supporting ISBN-10 and ISBN-13 formats - **ISBN Normalization**: Automatic ISBN format normalization (removes hyphens and spaces) supporting ISBN-10 and ISBN-13 formats
- **Advanced Search**:
- Partial matching search across title, author, series, tags, and contributors
- Automatic fuzzy search fallback when no partial matches found (handles typos and misspellings)
- Real-time search results with highlighted matches
- Keyboard navigation (↑↓ arrows, Enter to select, Escape to close)
- Respects library visibility settings
- **Advanced Rating**: 5-star system with half-star precision (1-10 scale) - **Advanced Rating**: 5-star system with half-star precision (1-10 scale)
- **Reading Progress**: User-specific progress tracking with current page and total pages - **Reading Progress**: User-specific progress tracking with current page and total pages
- **Notes & Highlights**: Personal annotations and text highlighting with color customization - **Notes & Highlights**: Personal annotations and text highlighting with color customization
@@ -144,6 +150,30 @@ PUT /api/ebooks/{id}/highlights/{highlightId} # Update ebook highlight
DELETE /api/ebooks/{id}/highlights/{highlightId} # Delete ebook highlight DELETE /api/ebooks/{id}/highlights/{highlightId} # Delete ebook highlight
``` ```
#### Media Search (All Authenticated Users)
```bash
# Search media items across all visible libraries
GET /api/media-items/search?q={query}
# Query Parameters:
# q (required): Search query (minimum 2 characters)
# - Searches across: title, author, series, tags, contributors
# - Partial matching: Case-insensitive substring search
# - Fuzzy fallback: Automatic when no partial matches found
# - Results ranked by relevance
# Examples:
GET /api/media-items/search?q=harry%20potter # Search by title
GET /api/media-items/search?q=rowling # Search by author
GET /api/media-items/search?q=hary%20poter # Fuzzy search (handles typos)
# Response:
# - 200: Success (returns array of media items)
# - 404: No results found
# - 400: Missing or invalid query parameter
# - 401: Unauthorized
```
#### Library Management (Admin Only) #### Library Management (Admin Only)
```bash ```bash
# Create new library # Create new library