Inverse Indexes (Map<Key, Set<FileId>>)

IndexedDB

Per-file contributions persisted. Delta reconciliation on restart. Debounced + periodic flush.

Contribution Tracker

Per file: which keys this file contributes to each index. Enables O(contributions) removal on update.

Event Handlers

Route each event to the correct index update method

Obsidian MetadataCache

changed · deleted · resolve · rename

Backlink Index

dest → sources

Combined + body + frontmatter

Frontmatter Index

key → files key+value → files

Embed Index

dest → embedders

Heading Index

heading → files

Tag Index

tag → files

Combined + body + frontmatter

Also: aliases · blocks · tasks · unresolved backlinks

File Intern

path ↔ numeric ID Set<number> in all indexes

Query API

getFilesWithTag() getBacklinksForFile() ... 25+ methods

persistresolve pathsflush