Update test environment and request files to use different test data: - Update job_id variable to new test job UUID - Change search test queries from Foundation/Asimov to 1984/Orwell - Change series search from Foundation to Haley - Add force parameter to scanner test These updates provide fresh test data for API testing and demonstrate search functionality with different media items.
79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
info:
|
|
name: Exact Match With Quotes
|
|
type: http
|
|
seq: 5
|
|
|
|
http:
|
|
method: GET
|
|
url: '{{base_url}}/api/media-items/search?library_id={{library_id}}&q="1984"'
|
|
params:
|
|
- name: library_id
|
|
value: "{{library_id}}"
|
|
type: query
|
|
- name: q
|
|
value: '"1984"'
|
|
type: query
|
|
auth: inherit
|
|
|
|
settings:
|
|
encodeUrl: true
|
|
timeout: 0
|
|
followRedirects: true
|
|
maxRedirects: 5
|
|
|
|
docs: |-
|
|
## Exact Match With Quotes
|
|
|
|
Searches for an exact phrase match by wrapping the query in double quotes.
|
|
|
|
**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): Exact phrase to match (must be wrapped in double quotes)
|
|
|
|
**How Exact Match Works:**
|
|
- Wrap query in double quotes: `"\"exact phrase\""`
|
|
- Uses ILIKE pattern matching with wildcards
|
|
- Case-insensitive
|
|
- Must match the exact phrase (no fuzzy matching)
|
|
- Searches in: title, author, series, tags, contributors
|
|
|
|
**Fuzzy vs Exact Match:**
|
|
- Fuzzy (default): `asimov` → Matches "Asimov, Isaac", "Foundation and Asimov"
|
|
- Exact (with quotes): `"\"Asimov, Isaac\""` → Matches ONLY "Asimov, Isaac"
|
|
|
|
**Response:** HTTP 200 (OK)
|
|
```json
|
|
[
|
|
{
|
|
"id": "uuid",
|
|
"title": "Foundation and Empire",
|
|
"author": "Asimov, Isaac",
|
|
"library_id": "uuid",
|
|
"library_name": "E-Books"
|
|
}
|
|
]
|
|
```
|
|
|
|
**Examples:**
|
|
- `q="\"Foundation and Empire\""` → Only "Foundation and Empire" (not "Foundation")
|
|
- `q="\"The Hobbit\""` → Only "The Hobbit" (not "The Hobbit: There and Back Again")
|
|
- `q="\"J.R.R. Tolkien\""` → Only exact author name match
|
|
|
|
**When to Use Exact Match:**
|
|
- Searching for exact book titles in a series
|
|
- Finding specific edition or version
|
|
- Exact author name matching
|
|
- Preventing false positives from similar terms
|
|
|
|
**Success Criteria:**
|
|
- Status: 200
|
|
- Returns items with exact phrase match
|
|
- No fuzzy matching applied
|
|
- Case-insensitive but must match exactly otherwise
|