Features/Queries
Queries
- A query block is a live list of every block (or page) in your graph that matches a filter. Write it once with
{{query …}}; Tine keeps the results current as you edit, and the file stays an ordinary Logseq query block. Where an answer can differ from Logseq's, Reference/Tine query model says how and why.
A query in action
- Queries refresh when an edit can affect their results. Queries over links, graph-wide tag targets or the property registry wait until you pause typing for 1.5 seconds, then read the latest saved publication. Continuous typing keeps the last answer visible until that pause.
- While a query refreshes, its previous results stay visible, including in Scheduled & Deadline and other journal sections. A journal section with no results hides once the refresh finishes.
- Every open task in this graph:
- Query 16
- TODO A plain task marker
- DOING A task in progress
- TODO [#A] High-priority task
- TODO [#B] Medium-priority task
- TODO [#C] Low-priority task
- TODO A scheduled taskSCHEDULED: 2026-07-10 Fri
- TODO A task with a deadlineDEADLINE: 2026-07-12 Sun
- TODO A repeating taskSCHEDULED: 2026-07-10 Fri .+1w
- TODO [#A] Draft the sheet docs #sheets-demoSCHEDULED: 2026-07-08 Wedowner:: Martinestimate:: 2
- DOING Polish cell menus #sheets-demoowner:: Codexestimate:: 5
- DOING Write my first real note in Tine
- TODO Set up the quick-capture hotkey — see Features/Quick capture
- TODO Open my own Logseq graph and look around
- TODO Click this checkbox to complete me
- TODO [#A] Collect the audit receiptsSCHEDULED: 2026-08-12 Wed
- TODO Book the flightsDEADLINE: 2026-08-15 Sat
Create one yourself
- 1. Type
/queryand choose Query, or write{{query (task TODO)}}yourself. The slash command opens the query sheet on its empty condition list; press + Add condition to choose the first field. - 2. At rest a query block shows its title, result count and results. Click the title to rename it. Fold the query block's bullet to hide its results, as in Logseq; the small arrow in the query's header is the same fold, so clicking either one shows in both and is saved as the block's ordinary
collapsed::property. A query written with{:collapsed? true}starts folded, and unfolding it is saved ascollapsed:: false. Hover over or focus the query to reveal the pencil (Edit query) and ⋯; on touch screens both are always visible. The pencil, or ⋯ → Edit, opens the inline builder; View for display choices, or Edit as text for TQL. Advanced datalog keeps its original block-text editor. - 3. The sheet says what the query finds — Find blocks ▾ where … — and shows one row per condition: a handle to drag it (or move it with the arrow keys), a box to select it, the field, operator and value, a switch that turns it off without removing it, a ⋮ for the rest, and an × to remove it. + Add condition adds one.
- 4. Tick two or more rows in the same list and press Group selected ▾ to make them one All of, Any of or None of group. A group's ⋮ Ungroup puts its rows back. Groups are set off by a heavier rail and a divider, and a query whose top level is Any of says so above its rows.
- Drag a row's handle onto another group to move that condition into it; a group left with one condition dissolves into the list around it. The Task field has an Any status choice (every task marker), and In a journal page keeps only blocks that sit on a journal day. Scheduled and Deadline ranges read in plain words (Scheduled: next 7 days), and nothing the builder wrote is labelled advanced.
- While the inline builder is open, the real results below it follow every change you make, before you save. The builder stays in the outline, and only the latest answer is shown. A new empty query says Add a condition to see results. instead of listing every page. Removing the last condition returns to that same empty state, even if a sort remains.
- 5. Press Done (at the bottom right of the builder) or Escape to close the inline editor; the title, count and results remain. The results show as blocks grouped by page, or as pages when the query finds pages; choose ⋯ → View → Search, List, Table or Board to change how they are shown — the matches stay the same. Matches that share a parent show that parent's breadcrumb once. A block that matches directly under another block that also matches is not a result of its own, as in Logseq: it shows inside its parent (the List draws the parent's children), and the count, Table and Board list the parent only; a match under a block that does not match is its own result. Search and List page results show the page title with the page's properties as text underneath; press the pencil beside a result to edit those properties in the page's property panel (the change is written to the page's file, and the row updates). In Find blocks ▾ choose Pages and blocks to see both answers of the same conditions, Pages above Blocks; the builder then reads Find pages and blocks, the Blocks section follows the List, Table or Board you picked, and a section that a Sample cut short says More pages match than are shown (or blocks) (stored as
tine.result-kinds:: pages-and-blocks; Logseq ignores that property and reads the query as before).
Query text
- Renaming keeps the current results visible. An unsaved text draft leaves the results unchanged until Save query text. Saving keeps focus in the editor; Escape or Done closes it and returns focus to the query's ⋯ menu.
- Open search tab in Ctrl+K search for a friendly search tab with separate Pages and Blocks sections. An alias result opens its owner page. Choose Pages match to search names and aliases, containing block text, or both; saving that search writes
tine.page-match-scope:: contentorbothbeside the ordinary query block. - Use each section's Display control independently. Sort orders all matching Pages or Blocks before that section's limit; Sample keeps the first N of that order, separately for each section. A Pages board groups adjacent results by its chosen field while keeping their sort order. A Pages table can show authored page properties as columns while Blocks use a different view. Save page stores the choices as
tine.page-*andtine.block-*query block properties. - The query text is hidden by default: press Edit as text in ⋯ to open the query text box: the same query the rows show, written in Tine's text query language (
@blockor@page, then conditions joined withand,or,not). Type in it and Tine re-reads it as you go; press Save query text (bottom right) to make it the block's query; Cancel beside it drops unsaved text. - When Tine cannot read the text it names the problem, and a Show me button selects the part of the text it points at when it knows where that is.
- A
{{tine-query …}}block holds this language directly and runs like any other query block.
When a query needs Tine features
- Some queries have no
{{query}}spelling — scheduled/deadline date windows, grouping, column totals, typed comparisons. When you save one, Tine renames the block's macro fromquerytotine-queryand moves the view choices intotine.*properties on the same block. - For a scheduled window, use
{{tine-query @block scheduled between today and '+7d'}}; usedeadlinefor a deadline window. - To list the blocks that mention a day after today, use
{{tine-query any(direct_refs, day > today)}}. It finds a block that links or tags a journal day, such as[[Oct 22nd, 2026]],#[[Oct 22nd, 2026]]or[[2026-10-22]], whether or not that day has a journal file yet. Only the block's own links count, not those of its parent, and aSCHEDULED:orDEADLINE:date is not a mention (usescheduledordeadlinefor those). Combine it like any condition, for exampletask = 'TODO' and any(direct_refs, day between today and '+7d'). Insideany(direct_refs, …)a link hasname,journal(true for a journal day) andday. Today is your computer's local day when the query runs. Logseq ignores scheduled/deadline date windows in{{query}}, so Tine shows a cue and refuses to run those blocks as written. Click Convert to keep the same date-window meaning in{{tine-query …}}; the change can be undone. - A notice under the query says so: This query now uses Tine features Logseq can't read. Undo that change puts the block back to exactly the bytes it had; Keep it dismisses the notice.
Links between pages
- Tine's query text can follow links between pages. These are page conditions (
@page), and Logseq's{{query}}has no spelling for them, so a query that uses one is saved as{{tine-query …}}. any(links, …)— pages that link to a page matching the condition;any(linked_by, …)— pages linked to by one. A link is exactly what the Linked References panel shows:{{tine-query @page and any(links, name = 'Reading list')}}lists the same pages as Reading list's panel.every(…)andnone(…)work too:{{tine-query @page and none(linked_by, true)}}lists pages nothing links to.near(…, k)— the pages matching the first condition plus every page withinklink steps of them, both directions:{{tine-query @page and near(name = 'Project', 1)}}is Project, the pages it links to and the pages that link to it. Add'out'to follow links forward only, or'in'to follow them backwards only:near(name = 'Paper', 3, 'out').kis a whole number;0means the matching pages alone.- The default,
'both', is the pages withinksteps forward together with the pages withinksteps backward. Each path keeps one direction, so it is not every page withinksteps when you may switch direction along the way (what other graph tools call "both"): a page that merely links to the same page as Project is not near Project. Write twonear(…)conditions joined withorto combine other shapes. - A path goes through every page it reaches, journal days included. To leave pages out of the results, add a condition:
near(name = 'Project', 2) and journal = false.neartakes at most three arguments; a fourth is reserved for a later version and is an error today. - A page that is only linked to, with no file of its own, counts as a page here:
near(name = 'idea', 1, 'in')lists the pages that link to it. Renaming a page also updates the names insidenear(…)andany(links, …)of a share or export definition.
Simple queries
The simple query language is Logseq's. Combine filters with
(and …),(or …)and(not …):(task TODO DOING)— blocks with one of these task markers;(priority A)— by priority.(task)with no markers and(priority)with no levels add no condition, exactly as in OG Logseq:(and (task) [[x]])finds what[[x]]finds, and a query with no other condition shows nothing. A note on the query says so and offers Open tasks (every block that has a task marker exceptDONE,CANCELED, orCANCELLED, soWAITING,STARTEDandIN-PROGRESScount), Any task (every task marker), or A, B or C; each rewrites the clause to an explicit list and saves the block like any query edit. The visual builder always writes explicit marker lists such as(task TODO)or(task DONE), which keep their usual meaning.[[Page]],(page-ref Page),#tag— blocks that reference a page.(page "Page")— blocks on a page;(namespace Project)— blocks on the pages directly under a namespace (Project/Alpha, but notProject/Alpha/Beta; an advanced query'snamespaceclause matches every depth).(property status active),(page-property type book),(page-tags public)— by block or page properties and tags.(all-page-tags)lists the pages that some page uses as a tag. A page-level filter returns pages, not blocks.(between -7d today)— journal blocks in a date range. Dates aretoday,yesterday,tomorrow,2026-01-31, a journal title like[[Jan 31st, 2026]], or an offset like-7d,+2w,-1m,+1y(lowercase units, at most 10,000 years).(between created-at -7d now)— blocks whosecreated-at::(orcreated_at::) property falls in the range;last-modified-atworks the same. The first bound is included and the second is not, and the two may be given in either order. Besides the date forms, these bounds also takenow(the current moment) and offsets in hourshand minutesnsuch as+36hor-90n; day-based offsets andh/ncount from the start of today, not from the current time. A bound that is not one of these makes the whole query invalid.(sort-by priority asc),(sample 10)— order the results (bypriority,page,scheduled,deadlineor any property; like Logseq, the order is descending unless you writeasc), or keep a random N of the matches (chosen before sorting, so each run can show a different few). A query made only of these directives, with no condition, shows nothing. Without a sort, results are grouped by page: journal days newest first, then the other pages by name.- A bare word or quoted text finds the raw block text, including property lines and drawers. Query text is case-sensitive and accent-sensitive, like Logseq:
Alphadoes not findalpha, andcafedoes not findcafé. TQLcontent matchuses search syntax with this same exact matching;content likeis exact too. Ctrl+K, search tabs and in-page Find still ignore case and remove accents unless:feature/enable-search-remove-accents? falseis configured.
Property values ignore case:
(property status Done)also findsstatus:: done. Commas split values only fortags,alias/aliases, and keys in:property/separated-by-commasinlogseq/config.edn. Each comma item of those properties is also its own page link where the property is shown. Other values stay whole:(property list "Foo, Bar")findslist:: Foo, Bar, while(property list Foo)does not.- Explicit
#tagsand[[page references]]are separate values even without commas, in page and block properties:tags:: #eng #exec #foundermatches(page-tags eng)and(property tags eng).#[[multi word]]is one tag. Intags:: #a plain text #b, the plain text is also a value; in a custom property only the explicit references become values. Quoting the whole value keeps it literal.
- A block property on the query block itself can set the view:
tine.sort:: priority descandtine.sample:: 10win over the same directive in the query text.
Display and property types
- Open ⋯ → View to choose Search, List, Table or Board; add ordered sort fields and table columns, choose grouping, add count/sum/average summaries, or set a sample limit. The column picker offers only columns found in the current results, starts with the visible default columns checked and offers Select all and Select none. A saved column choice stays intact when that column disappears from the results; its checkbox returns when the column appears again. Choosing Page shows each block's owning page. The controls save on the query block as existing
tine.*properties;tine.fields::remains the table's schema and is not changed by a column choice. - Scheduled and Deadline conditions offer >, >=, =, < and <=, with today, yesterday, tomorrow or today±N days (for example
+5d). The Rust query engine decides which results match. - Task checkboxes in Search, Table and Board edit the original block through its ordinary save path. Click a table title or board card to open its source. Board columns scroll when they cannot fit.
- In List view, ⋯ → Collapse all / Expand all is one toggle that folds the result trees together. This writes the source blocks' ordinary
collapsed::property and can be undone. ⋯ → Search opens the same query in a Search tab.
Copy or revisit results
- Drag a List result's bullet to move that source block into your outline. Hold Alt when dropping one block to insert a block reference instead, leaving the source in place. The reference is inserted only after the source's ID has been saved. The same Alt gesture works on an ordinary outline bullet; a selection of several blocks still moves together.
- ⋯ → Copy results opens the same Copy / export as… dialog as an outline selection, with Text, OPML and HTML options. Each result tree sits under its page title; journals use their date titles, and descendants keep their hierarchy. A descendant already inside a selected parent is copied once.
- In a Search tab, press Select results, tick the results you want (or Select all / Select none), then Copy results for the same dialog and format. Selection actions stay above the result rows, which keep their page or block labels. Press Select results again or Done to leave selection mode.
- External changes and structural edits refresh the query after pending changes settle. Until then, old results stay read-only. A task click, copy or bulk fold refuses the whole action when its selected results are no longer current; a notice asks you to run the query again. A block with a unique authored
id::can still be resolved by that identity. - A query whose dates count from today (
today,yesterday,-7d,+7d, a:todayinput) runs again by itself when the date changes, so a window left open overnight shows the new day's results; after the computer slept through midnight this happens when you return to the window. A query with no such date is not run again. - A saved Scheduled or Deadline comparison offers
>,<,=,≥and≤in its operator menu, plus negation of the current comparison. Is not set tests an absent date in the date editor; it never means a negated date comparison. - ⋯ → Open in Search opens the query in a Search tab. The view (List, Table or Board, with its display choices) and Pages and blocks travel with it; results still come from the Rust engine.
- The full All pages view has a sortable Backlinks column: the number of referring blocks computed by the backend. All pages, Search and query blocks remain separate views.
- Search and List page results show the page title and its properties as text; press the pencil beside a result to edit them. Table columns stay in the Table view.
- Table titles are always shown and are listed as such in the column picker. Select all / Select none changes the other fields, preserving the meaning of existing column settings.
- A grouped summary says Grouped by and names the field. Choose ⋯ → View → Group by → None to remove grouping. When every result lacks that field, Tine shows the overall totals instead of a table containing only
(none). Opening View or choosing a summary does not choose a grouping field. - A query table's footer summarizes the query's complete sample, even when a table filter hides some rows. Sample limits the query before its totals are computed. Click a property total to choose Count, Sum, Average, or None; the choice is saved with the query's Display settings. Built-in columns such as Page and State have no property total. If statistics are unavailable, Tine leaves the total blank or shows why it is unavailable.
- A Logseq query written with
{:table-view? true},query-table:: trueon its block, or a trailingtable(for example{{query (task TODO) table}}) keeps its own table: the block'squery-properties:: [:block :page :status]chooses the columns and their order, andquery-sort-by:: statuswithquery-sort-desc:: falsesets the starting sort (descending unless you writefalse). In ⋯ → View → Columns, toggle Block, Page or a result property to save the choice inquery-properties::, readable by Logseq. Clearing every column removes that property and restores the default columns, as in Logseq. Clicking a column heading re-sorts for as long as the page is open without changing the file. The List/Table toggle saves onlytine.viewand never addsquery-table; an explicittine.view:: listoverrides an imported table choice. - The condition picker lists properties found in this graph with their observed type and the number of blocks or pages that carry them. A key found on both blocks and pages has separate choices for those scopes. You can type a key that has not appeared yet.
- Beside a property condition, declare type… writes
tine.type:: number,date,checkbox,refortexton the page named for that property key. Select list of for multiple values, or remove the declaration. The badge distinguishes an observed type from a declared one and shows mismatches against a declaration.
Advanced (datalog) queries
{{query {:query [:find (pull ?b [*]) :where …]}}}and#+BEGIN_QUERYblocks run a supported subset of Logseq's datalog: task markers, priority, page references, properties, page, namespace, page tags, scheduled/deadline and journal date ranges.- A query runs only if Tine can read every clause of it. If any clause is outside the supported subset (a
:result-transformother than Logseq's default priority sort, an unsupported input, a rule Tine does not know), the whole query is refused: a notice names the clauses Tine could not run and shows no results, because an answer to part of a query would be wrong. String page/tag inputs and numeric or relative date windows are supported; Reference/Tine query model lists the exact shapes. :inputs [:current-page]binds the page open in the focused pane, like Logseq: if no page is open it uses your configured home page, then today's journal. It is not the page the query block sits on.
When a query shows nothing
- Query source could not be parsed means the macro itself is damaged. Edit the block text to repair it; the visual builder becomes available once the source is readable. A query with a title such as
{{query (page-property tags gptpro) {:title "gptpro"}}}needs all three final braces: one closes the title options and two close the macro. - If Tine cannot read part of a query, the block says so — Tine didn't understand part of this query, so it returned no results — followed by what it could not read. An empty list without that message means the query is valid and nothing matches yet.
- An empty result offers why empty?: a table of the query's top-level conditions with how many rows each matches alone and how many the query would match without it, so the condition that emptied it stands out.
- A query that would return more than 20,000 rows (or 32 MiB) is refused with a message instead of being cut short. Narrow it, or add
(sample N).
Publish a query
- Share… in a query's ⋯ menu (or its share icon) opens the share dialog with this query, reviews the pages it selects and exports them; the export is saved as a definition so it can be repeated. See Features/Share pages.
- Use ⋯ → Export… on a query. Review the complete pages selected by the result, then choose an external folder. Tine creates a new named site there, with a read-only browser view and static HTML fallback. A block result publishes its whole owner page, so review those pages before continuing. The built-in Scheduled & Deadline section has no Export button.
- In Settings → Graph → Publish live site, choose an external folder to publish pages marked
public:: true. Include all pages is an explicit choice for a graph meant to be public; it still leaves out pages markedpublic:: false. The exported site can be served as ordinary static files.