feat: search filters for faces detected and faces unassigned #1136
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/search-face-filters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds two independent boolean filters to the media search (Filter & Sort menu, query-token based):
face:detected) — media with at least one live person face (discovery_results,domain_key=people, state notrejected/superseded)face:unassigned) — media with a live face that has no live assignment (spec 048 anti-join onclass_instance_occurrences, stateaccepted/tentative;owner_recognizedalone is deliberately not used as unassigned marker)Both are combinable (AND). Exposed as query tokens (case-insensitive key/value, identical duplicates rejected, distinct values combinable) and as repeatable
facerequest param; tokens win via existingmergeFilters. Chips: Face: Detected / Face: Unassigned.Changes
API —
SearchQueryParser,SearchFilters,SearchService.filterRestriction,SearchController,SearchResponseJavadoc. No schema change (existing indexes cover both probes). OpenAPI contract updated (faceparam plus drift fix for missingmediaType/approvalparams).Web —
queryTokens.ts(face key + values),FilterSortMenu.svelte(twomenuitemcheckboxtoggles after the approval block, favorite pattern),search/+page.svelte(state, handlers, chips, badge, focus id, clear),timeline.ts(repeatable face param).Verification
./gradlew :apps:api:test --tests '*SearchQueryParserTest*' --tests '*SearchServiceTest*'— 79 tests, 0 failures (11 new face tests)npm run test:unit— 93/93npx playwright test tests/search-filters.spec.ts— 42/42 (3 new face tests)npm run build+npm run check(0 errors, warnings on baseline)