- Update Combined Search and Filters to use tags_filter - Update Field Values Search to cover tags autocomplete - Add fuzzy matching examples for tags - Update search scenarios to use tags instead of genre Updates the Bruno API test collection to use the new tags filter instead of the genre filter, including fuzzy matching examples. Relates to IMPLEMENTATION_TAGS_FILTER.md Phase 6
91 lines
2.5 KiB
YAML
91 lines
2.5 KiB
YAML
info:
|
|
name: Combined Search and Filters
|
|
type: http
|
|
seq: 1
|
|
|
|
http:
|
|
method: GET
|
|
url: "{{base_url}}/api/media-items/search?library_id={{library_id}}&q=foundation&author_filter=asimov&tags_filter=scifi&year_min=1950&year_max=2000&sort=title ASC"
|
|
params:
|
|
- name: library_id
|
|
value: "{{library_id}}"
|
|
type: query
|
|
- name: q
|
|
value: foundation
|
|
type: query
|
|
- name: author_filter
|
|
value: asimov
|
|
type: query
|
|
- name: tags_filter
|
|
value: scifi
|
|
type: query
|
|
- name: year_min
|
|
value: "1950"
|
|
type: query
|
|
- name: year_max
|
|
value: "2000"
|
|
type: query
|
|
- name: sort
|
|
value: title ASC
|
|
type: query
|
|
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
|
|
- `tags_filter` (string, optional): Fuzzy match tags 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, tags) 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",
|
|
"tags": "Sci-Fi",
|
|
"copyright_year": 1951,
|
|
"library_id": "uuid",
|
|
"library_name": "E-Books"
|
|
}
|
|
]
|
|
```
|
|
|
|
**Example Use Cases:**
|
|
- Find "Foundation" by "Asimov" in "Sci-Fi" tags from 1950-2000
|
|
- Search "potter" with tags "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
|