Skip to content

Commit 1790e0e

Browse files
JeroenDeDauwclaude
authored andcommitted
Document namespaceId cross-wiki filtering caveat in the graph model
Follows-up to #946 Clarifies that the new `namespaceId` page property uses MediaWiki's canonical namespace IDs: built-in namespaces have the same ID on every wiki, so filtering behaves consistently when the graph is shared by multiple wikis, while custom namespaces defined via $wgExtraNamespaces get per-wiki IDs and should be paired with wiki_id for unambiguous cross-wiki filtering. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 754b070 commit 1790e0e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docs/reference/graph-model.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ page ids are only unique within a single wiki. Each page node therefore carries
4747
`creationTime` and `lastUpdated` are stored as Neo4j datetime values (ISO 8601), converted from MediaWiki's
4848
`YmdHis` timestamp format.
4949

50+
`namespaceId` holds MediaWiki's canonical namespace ID. Built-in namespaces (e.g. `0` main, `12` Help, `14`
51+
Category) have the same ID on every wiki, so filtering by `namespaceId` behaves consistently across a graph
52+
shared by multiple wikis. Custom namespaces defined via `$wgExtraNamespaces` get per-wiki IDs that may differ in
53+
meaning between wikis, so pair `namespaceId` with `wiki_id` to filter those unambiguously.
54+
5055
## Subject Nodes
5156

5257
Each Subject stored on a page gets a `:Subject` node. Subject nodes carry two labels: `Subject` and the name of

0 commit comments

Comments
 (0)