# S01: Multi-Field Composite Search — UAT

**Milestone:** M012
**Written:** 2026-04-01T06:23:31.588Z

## UAT: Multi-Field Composite Search

### Preconditions
- Chrysopedia containers rebuilt and running on ub01 with M012/S01 code
- `POST /admin/pipeline/reindex-all` executed to re-embed with enriched text
- At least 2 creators with technique pages exist in the database

### Test Cases

#### TC1: Multi-token AND — both tokens match across different fields
1. Open `http://ub01:8096`
2. Type a query combining a known creator name + a known technique topic (e.g., "keota snare" if Keota has snare-related content)
3. Press Enter or wait for search
4. **Expected:** Results shown where creator matches "keota" AND content matches "snare". No results that match only one token.

#### TC2: Multi-token AND — single-field match
1. Search for two words that both appear in a single technique title (e.g., "bass design")
2. **Expected:** Results where title/summary contains both "bass" AND "design". Result count ≤ count for either word alone.

#### TC3: Partial matches fallback
1. Search for a two-word query where one word is nonsensical (e.g., "xyznonexistent snare")
2. **Expected:** Banner: "No exact matches for all terms". Below: "Results matching some of your terms:" showing results for "snare" only, with muted styling.

#### TC4: Single token — no partial matches section
1. Search for a single common word (e.g., "reverb")
2. **Expected:** Normal results list. No partial matches section shown (partial_matches only triggers on multi-token zero-AND queries).

#### TC5: Both empty — empty state
1. Search for "xyznonexistent abcfake"
2. **Expected:** "No results found" empty state. No partial matches section (neither token matches anything).

#### TC6: Creator name in search
1. Search for a known creator name only (e.g., "keota")
2. **Expected:** Results include that creator's technique pages and key moments. Creator field matching works for both keyword and semantic paths.

#### TC7: Tag-based search
1. Search for a known topic tag (e.g., "sound design")
2. **Expected:** Results include technique pages tagged with that topic. `array_to_string` matching works for `topic_tags` field.

#### TC8: Semantic search enrichment
1. Search for a creator name that wouldn't appear in technique titles (only in creator metadata)
2. **Expected:** Semantic search (Qdrant) returns results because embedding text now includes creator_name.

#### TC9: Reindex-all endpoint
1. `curl -X POST http://ub01:8096/api/v1/admin/pipeline/reindex-all`
2. **Expected:** 200 response with count of videos dispatched. Worker logs show stage 6 tasks queued.

#### TC10: API response shape
1. `curl 'http://ub01:8096/api/v1/search?q=test'`
2. **Expected:** JSON includes `"partial_matches": []` field (empty array when results exist). Shape: `{items, total, query, fallback_used, partial_matches}`.
