BacklinkIndex.h header

#include <ew/app/BacklinkIndex.h>

Namespace ew::app

BacklinkIndex class

class ew::app::BacklinkIndex

A reverse index of entity mentions: for any entity, which objects mention it. It is built by scanning every document body and every entity's field values with an EntityLinker, so it captures both prose references and derived links (e.g. an entity whose "homeland" field names another entity). Call rebuild() after content changes.

Members

ew::app::BacklinkIndex::BacklinkIndex(const ew::core::Project &project)

Builds a project-only index over project (no mounted libraries).

ew::app::BacklinkIndex::BacklinkIndex(const ew::core::Project &project, const MountedLibraries &libraries)

Spanning constructor: indexes the project plus every mounted library, so a mention of a shared-library entity (or a reference from a library object) registers as a backlink too – keeping backlinks consistent with the mount-spanning auto-linker and relationship graph.

void ew::app::BacklinkIndex::rebuild()

Rebuilds the index from the current project (and mounted-library) state.

std::vector< Backlink > ew::app::BacklinkIndex::backlinksTo(ew::core::ContentId target) const

Returns every mention of target across the span, ordered by source id.