[VS-NfD] Remove trashed content from the search index instead of filtering at query time #195
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#195
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Plan reference:
20-massnahmenplan.md-> Phase 2ADR: n/a
Effort: M (2 AT)
Depends on: —
Context
The full-text index holds plaintext of trashed pages and ponds; only the
query hides them. Any future query path that forgets the filter leaks
content, and the index is a content copy that a deletion concept has to
account for.
Current state
apps/api/src/search/postgres-search.provider.ts:41— the weightedtsvectorlives onpage_content_cache.search_vector.:142–143— the search query joinspages p ON … p.deleted_at IS NULLandponds po ON … po.deleted_at IS NULL: query-side filtering.:73shows the vector can be nulled per page(
UPDATE page_content_cache SET search_vector = NULL WHERE page_id = …).Acceptance criteria
pages; restoring rebuilds it.
deleted_at IS NULLguards stay (defence indepth) and a test asserts both layers independently.
themselves, not merely from results; restore makes it findable again.
docs/architecture/security.mdrecords that the index holds notrashed content (the file has no search section today — add one, or
extend §"Content & upload security").
Out of scope
Encrypting or removing the plaintext cache for live pages, and any change
of search engine.
Delivered by PR #250 (
960a806), merged to main fast-forward. CI run 497 green. Both layers proven independently (index rows + query guards); backfill migration included. Closing.