10 Commits

Author SHA1 Message Date
logaritmisk 1cdfa21259 feat(search): index + return recording_date on search hits (#61)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:41:17 +02:00
logaritmisk 984be697ac feat: audit vocabulary/term/authority creation, attributing the acting user (#21)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 21:54:50 +02:00
logaritmisk 9b1771d584 refactor(search): document+guard visibility filter precondition; drop redundant dev-dep
- Remove serde_json from [dev-dependencies] (already in [dependencies])
- Add debug_assert! in search_objects visibility filter as defense-in-depth
- Extend search_objects doc-comment with visibility precondition
- Clarify estimated_total_hits.unwrap_or(0) is safe under offset/limit pagination
- Add brief comment on with_crop_length(20) explaining ~20-word context window

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 11:19:46 +02:00
logaritmisk 84c4c2807b feat(search): search_objects returns highlighted hits + estimated total
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 10:46:54 +02:00
logaritmisk d15afda9b2 feat(api): on-write search reindex after catalogue writes (#17)
Wire best-effort Meilisearch index sync into the admin write paths
(create/update/delete/set_fields/set_visibility). Adds
SearchClient::sync_object (reindex if the object exists, remove if gone —
one uniform path), an optional AppState.search client, and a reindex
helper that logs failures via tracing without failing the committed
write. Server gains MEILI_URL/MEILI_MASTER_KEY/MEILI_INDEX config;
search stays disabled (no-op) when unset. reindex_all remains the
recovery path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 23:25:43 +02:00
logaritmisk fac4b703ff docs(search): document eventual-consistency model; drop stale Task 2 note 2026-06-02 12:15:18 +02:00
logaritmisk 4bafac397a docs(search): note why reindex test references db crate migrations 2026-06-02 12:12:12 +02:00
logaritmisk 7b91989411 feat(search): build documents resolving term/authority labels; reindex_all
Implements build_document in the search crate: resolves Term and Authority
flexible-field values to their human-readable labels so reindex_all produces
documents that Meilisearch can match on label text, not raw UUIDs.
Adds integration test covering the full reindex→search round-trip.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 12:08:07 +02:00
logaritmisk b8d198f150 fix(search): surface failed Meilisearch tasks; make ensure_index idempotent
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 11:50:58 +02:00
logaritmisk dc903989f7 feat(search): add Meilisearch-backed SearchClient (index, search, remove)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 11:43:53 +02:00