info: name: Combined Search and Filters type: http seq: 1 http: method: GET url: "{{base_url}}/api/media-items/search" params: - name: library_id value: "{{library_id}}" type: query disabled: false - name: q value: "foundation" type: query disabled: false - name: author_filter value: "asimov" type: query disabled: false - name: genre_filter value: "scifi" type: query disabled: false - name: year_min value: "1950" type: query disabled: false - name: year_max value: "2000" type: query disabled: false - name: sort value: "title ASC" type: query disabled: false auth: inherit settings: encodeUrl: true timeout: 0 followRedirects: true maxRedirects: 5 docs: |- ## Combined Search and Filters Combines a search query with multiple filters to find specific media items. **Method:** GET **Endpoint:** /api/media-items/search **Authentication:** Required (Bearer token) **Query Parameters:** - `library_id` (string, required): Library UUID to search within - `q` (string, required): Search query for title/author/series/tags (fuzzy match) - `author_filter` (string, optional): Fuzzy match author field - `genre_filter` (string, optional): Fuzzy match genre field - `year_min` (integer, optional): Minimum copyright year (exact match) - `year_max` (integer, optional): Maximum copyright year (exact match) - `sort` (string, optional): Sort order (e.g., "title ASC", "author DESC", "created_at DESC") **How Combined Search Works:** - All filters are AND'd together (must match ALL conditions) - Search query (`q`) uses fuzzy matching across title, author, series, tags - Text filters (author, genre) use fuzzy matching - Year filters use exact range matching - Results sorted by relevance first, then by sort parameter **Response:** HTTP 200 (OK) ```json [ { "id": "uuid", "title": "Foundation", "author": "Asimov, Isaac", "genre": "Sci-Fi", "copyright_year": 1951, "library_id": "uuid", "library_name": "E-Books" } ] ``` **Example Use Cases:** - Find "Foundation" by "Asimov" in "Sci-Fi" genre from 1950-2000 - Search "potter" with genre "fantasy" published after 2000 - Find "mars" books by "sci-fi" authors sorted by date **Success Criteria:** - Status: 200 - Returns items matching all filters - Results sorted by relevance then by sort parameter - Only returns items matching ALL specified conditions