Query Expression
A query expression allows you to search for specific zettel and to perform some actions on them. You may select zettel based on a list of zettel identifier, based on a query directive, based on a full-text search, based on specific metadata values, or some or all of them.
A query expression consists of an optional zettel identifier list, zero or more query directives, an optional search expression, and an optional action list. The latter two are separated by a vertical bar character (“|”, U+007C).
A query expression follows a formal syntax.
Here are some examples, which can be used to manage a Zettelstore:
Query Expression | Meaning |
---|---|
role:configuration | Zettel that contains some configuration data for the Zettelstore |
ORDER REVERSE created LIMIT 40 | 40 recently created zettel |
ORDER REVERSE published LIMIT 40 | 40 recently updated zettel |
PICK 40 | 40 random zettel, ordered by zettel identifier |
dead? | Zettel with invalid / dead links |
backward!? precursor!? | Zettel that are not referenced by other zettel |
tags!? | Zettel without tags |
expire? ORDER expire | Zettel with an expire date, ordered from the nearest to the latest |
00001007700000 CONTEXT | Zettel within the context of the given zettel |
PICK 1 | REDIRECT | Redirect to a random zettel |