Logseq Office Hours #2: Building processes with queries
Based on Logseq's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Queries in Logseq behave like saved searches that combine block structure, links, date filters, and properties to produce dynamic collections.
Briefing
Logseq queries are essentially saved searches that let users “slice and dice” their notes by combining block structure (indentation), links, date filters, and metadata properties—turning scattered journaling or task notes into repeatable, process-driven views. The session’s core message is that getting queries right depends less on memorizing syntax and more on thinking in Logseq’s fundamental units: blocks arranged into parent-child branches, connected by links, and enriched with properties.
The walkthrough starts with the building blocks. In Logseq, every bullet is a block (the smallest unit of knowledge). Indentation creates parent-child relationships, forming branches—collections of nested blocks that behave like a tree. Queries don’t just search a single bullet; they evaluate the branch context created by indentation. That’s why indentation matters: if related content sits at the wrong level (siblings instead of parent-child), the query results change because the branch membership changes.
Links are introduced as the second foundational concept. Square-bracket wiki links create bidirectional connections between pages and also between the page and the blocks that reference it. While search can be done via text patterns, links become especially powerful when used as query terms—allowing users to treat their graph structure like an index. This sets up the idea that queries can function like custom collections: a query can return all blocks that match certain link and text conditions, effectively acting as a dynamic page of results.
From there, the session moves into query logic using filters that resemble boolean search. Users can require multiple terms with AND, allow alternatives with OR, and exclude terms with NOT. A live example demonstrates how a query that looks for blocks containing both “journal” and “sad” returns the matching branch, and how unindenting changes which blocks belong to that branch—altering results. The key takeaway is that query outcomes reflect both the content you wrote and the structural relationships created by indentation.
The session then models a practical workflow for building queries step by step: start broad, verify results, then add constraints. A journal example begins with fetching all blocks between two dates using the between date filter (e.g., April 1st through today). Next, it narrows results to blocks linked to the journal page, then further filters to morning entries by adding additional arguments (and optionally excluding evening). The same incremental approach is repeated with properties—metadata stored as key-value pairs using the :: syntax. Properties enable more precise filtering, such as returning only entries where mood equals “sad” during morning.
Finally, queries are positioned as operational tools, not just search. The session shows how templates and properties can feed an “inbox” or pipeline: blocks created by templates appear in query-driven lists, and when a property like status changes (e.g., from to-do to done), the block disappears from one list and moves to another. Table view is highlighted as a major advantage of properties, since it can render property-based columns for easier review. Q&A addresses practical concerns like where to place tags (order doesn’t matter; the query returns the last matching block in a branch) and feature requests such as dropdowns for property values and better UI/visual query building. The session ends by pointing to a community hub for workflows and learning resources, emphasizing that documentation and query explanations still need refinement based on user feedback.
Cornell Notes
Logseq queries work best when users think in blocks, branches, links, and metadata. Indentation creates parent-child branch structure, and queries evaluate that branch context—so moving a block to a different indentation level can change results. Queries behave like saved searches using boolean-style logic (AND/OR/NOT) and can filter by dates (e.g., between April 1st and today), links (square-bracket wiki links), and properties (key-value pairs like mood:: sad). Properties unlock table view, making it easier to scan results. In practice, templates plus properties let queries act like inboxes and pipelines: when a status property changes, blocks shift between query-driven lists automatically.
Why does indentation (parent-child structure) matter for query results in Logseq?
How do links and properties differ as tools for finding notes?
What is the recommended method for building a complex query without getting lost?
How does the between date filter work in practice?
How can queries function like an inbox or workflow pipeline?
What did Q&A reveal about tag placement and query matching?
Review Questions
- When a query returns a branch rather than a single block, how does indentation change which blocks are considered part of that branch?
- Design a query for journal entries between two dates that also match a specific journal type (morning vs evening) using AND/NOT logic—what filters would you add in sequence?
- What advantages do properties provide over links for building dashboards, and how does table view relate to properties?
Key Points
- 1
Queries in Logseq behave like saved searches that combine block structure, links, date filters, and properties to produce dynamic collections.
- 2
Every bullet is a block; indentation creates parent-child relationships that form branches, and queries evaluate branch context rather than isolated bullets.
- 3
Square-bracket wiki links create bidirectional relationships and can be used as query terms to find blocks connected to specific pages.
- 4
Boolean-style logic (AND/OR/NOT) is the core mental model for combining filters and narrowing results.
- 5
A practical query-building workflow is to start with one broad filter (like between dates), verify output, then add constraints step by step.
- 6
Properties (key-value pairs via ::) enable precise filtering and unlock table view for scanning results efficiently.
- 7
Templates plus properties make queries operational: changing a status property moves blocks between query-driven inboxes and pipeline stages.