Ancestor Context
What is a property value in an ancestor context?
Documents can be set in a hierarchy. If documents are referenced as property values, the hierarchy of these documents may be of interest in queries.
The ancestor context can be traversed from the root to the leaves (downstream) or from a node to its root (upstream).
Roles Example
Suppose you have Role documents for Customer, User, and Operations. Operations has child documents System Admin, Application Admin, and Support. Application Admin is subdivided into Application A Admin, Application B Admin, and Application C Admin.
Suppose further that you provide documentation for people in those roles. Therefore you create instances of the doctype Topic. A topic provides a document property called Audience to define the roles this topic is relevant for.
Topic Title | Audience |
---|
Ops Basics | Operations |
Support Topics | Support |
Common Configuration Options for Applications | Application Admin |
Configuration Options for Application B | Application B Admin |
Now you want to list all documents relevant for Application Admins. This should include all generic documents, but not documents for specific applications.
$<Audience>=^Application Admin^
This will select all documents for the Audience 'Application Admin' and its ancestors (Operations and Role).