You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DB graph: deleting a property removes every page/block that held it from the search index (never re-added) #1153
Version: Logseq 2.0.1 desktop (macOS), DB graph. Reproduced through the db-worker-node; the same worker code path runs for the UI.
Steps to reproduce
In a DB graph create a page Test Page and add a user property foo (any type) with a value.
Search for Test Page — it is found.
Delete the property foo (property page → delete, or logseq remove property).
Search for Test Page again.
Expected: the page is still found. Actual: the page (and any block that held foo) no longer appears in search. Only Rebuild search index — or editing the page title — brings it back. Nothing in the UI indicates the index is stale.
In my graph a property migration that deleted one Text property silently dropped 40 of 94 #Book pages plus ~60 blocks from search; the rows were still in Datascript, only the FTS blocks rows were gone.
Deleting the property retracts its :block/uuid/:block/name/:block/title datoms, so the property eid is in ref-eids. Its holders reference it via :block/refs, so (referrer-eids db-before ref-eids) puts every holder into remove-eids. In db-after the property entity no longer exists, so (referrer-eids db-after ref-eids) is empty, and the holders' own titles did not change — they never reach add-eids. db_listener then deletes them from blocks/blocks_fts and upserts nothing.
Renaming a property (entity still exists in db-after) and hard-deleting a referenced block (referrers get a title rewrite) are fine; only entity deletion with surviving referrers hits this.
Suggested fix
Also include the before referrers on the add side, so referrers that still exist get re-indexed:
Entities that no longer exist in db-after are dropped by entities-for/block->index, and sync-search-indice already moves those into the remove set via the set/difference. A test in src/test/frontend/worker/search_test.cljs mirroring the existing deleted-at test (delete a property entity, assert its former holders are in :blocks-to-add) would cover it.
Workaround
Run Rebuild search index after deleting any property.
Activity
mszummer commentedon Sep 5, 2026
Cannot reproduce the above. Deletion seems to work as I expected.
Also MacOS, Logseq DB 2.0.1
Deleting property, and searching for page still shows.