Skip to content

Query Syntax

Single-box input (internal/query/query.go:Parse). Bare words substring-match the body/frontmatter (with a fuzzy title fallback); key:value tokens hard-filter. Tokens combine with AND. Keys case-insensitive; values preserve case. Quote multi-word values: title:"Monthly Active". | alternation is not supported in v1 (reserved, see the Roadmap).

TokenMeaningExample
word …Bare words, AND-combined. Case-insensitive substring match against SearchBlob (body + frontmatter), with a fuzzy fallback against the title only.kumquat zebra
tag:v / tags:a,bInclude tag(s), case-insensitive. tags: splits on commas.tag:launch
-v / !v inside tag valueNegate a tag. Only tag values support negation.tag:-launch
type:VNormalized type, case-insensitive exact.type:Task
title:textFuzzy-contains (case-insensitive) against title. Repeatable — joined with space.title:Monthly
path:subCase-insensitive substring of file path.path:portent
status:VCase-insensitive exact against lowercased status. status:archived also matches archived:true.status:Draft
organized:VBoolean filter over normalized organized (true/false; unset = false).organized:true
archived:VBoolean filter over IsArchived().archived:true
created:D, updated:DDate filter on CreatedAt/UpdatedAt.created:2024-05-01
date:DMatches if either date satisfies D.date:2023-11-15
before:D / after:DExclusive upper/lower bound on either date.before:2024-01-01
key:value (other)Generic filter: Raw lookup case-insensitive (underscores ignored), then normalized fields (description, resource, role, tags, body, format, belongs_to/related_to, dates…). Value fuzzy-matches. Unknown key → no match.author:bob
FormMeaning
2024-03-15Exact day (inclusive). 2024-01 = whole month; RFC3339 = instant.
A..BInclusive range. Either end may be empty (2024-01-01.., ..2024-12-31).
>=D / <=DInclusive lower/upper bound (day/month expands to start/end of period).
>D / <DExclusive lower/upper bound.

Supported layouts: YYYY-MM-DD, YYYY-MM, RFC3339, plus 2006-01-02T15:04:05 and 2006-01-02 15:04:05. Anything else is a parse error.

See also: Frontmatter Model for which fields queries match against, and Search & Ranking for how filters combine with fuzzy scoring.