Obsidian Search Parity
This page tracks the intended search-query and search-UI parity target for the bundled search implementation against Obsidian’s Search plugin documentation at https://obsidian.md/help/plugins/search.
The goal is not to clone every internal implementation detail. The goal is to preserve the user-visible query language, result semantics, and core sidebar workflows closely enough that Obsidian search terms transfer directly.
Upstream Feature Areas
Obsidian’s documented Search plugin behavior covers these main areas:
- Search terms: word conjunction, exact phrases,
OR, parentheses, negation, and regex. - Search operators:
file:,path:,content:,match-case:,ignore-case:,tag:,line:,block:,section:,task:,task-todo:, andtask-done:. - Search properties:
[property],[property:value],[property:null], property comparisons such as[duration:<5], and grouped or regex subqueries inside property values. - Search UI behavior: explain search term, collapse results, more context, sort order, recent searches, copy search results, and the sidebar search workflow.
- Search scope: notes and canvases, with embedded
querycode blocks as a separate rendering surface.
Current Parity Matrix
| Obsidian feature | Current state | Notes |
|---|---|---|
| Plain word conjunction | Implemented | Runtime lexical search treats whitespace-separated terms as AND. |
| Exact phrases | Implemented | Parsed and normalized through the shared search-query AST. |
OR | Implemented | Runtime evaluation now preserves boolean alternatives. |
| Parentheses | Implemented | Grouped expressions are evaluated through the shared search-query AST. |
Negation with - | Implemented | Negative clauses exclude matching documents from lexical results. |
Regex /.../ | Implemented | Regex literals execute against searchable fields with case-mode awareness. |
Bare property existence [property] | Implemented | Resolved against indexed frontmatter property records rather than plain text. |
Property value match [property:value] | Implemented | Evaluated against indexed frontmatter property values. |
Property null | Implemented | Matches indexed empty, nullish, or empty-array property values. |
Property comparisons [duration:<5] | Implemented | Numeric, date-like, and fallback string comparisons are evaluated at runtime. |
| Nested property subqueries | Implemented | Grouping, OR, phrases, and regex subqueries run against property values. |
file: | Implemented | Filters against the indexed file basename. |
path: | Implemented | Filters against the vault-relative path. |
content: | Implemented | Filters against indexed document content. |
tag: | Implemented | Filters against normalized tags, tag parts, hierarchy, and #tag spellings. |
match-case: / ignore-case: | Implemented | Supported as query operators and through the sidebar match-case setting. |
line: | Implemented | Runs the nested expression against individual content lines. |
block: | Implemented | Runs the nested expression against same-block text regions. |
section: | Implemented | Runs the nested expression against heading-bounded sections. |
task: / task-todo: / task-done: | Implemented | Runs task expressions against markdown task lines filtered by completion state. |
| Explain search term | Implemented | The sidebar can explain simple AST-backed terms. |
| Collapse results | Implemented | Persisted sidebar setting. |
| Show more context | Implemented | Persisted sidebar setting. |
| Sort order | Implemented | Sidebar supports the documented file and timestamp sort modes. |
| Recent searches | Implemented | Empty-query sidebar state lists persisted recent searches, and ArrowUp / ArrowDown from the start of the query recall them without leaving the input. |
| Copy search results | Implemented | The sidebar can copy grouped search results to the clipboard. |
| Search selected text shortcut flow | Implemented | Command flow opens search seeded with the active editor selection. |
| Search notes and canvases | Implemented | Search refresh and canvas vault events index .canvas user-visible node and edge text. |
Embedded query code block | Implemented | The search plugin renders fenced query blocks as clickable search-result lists. |
Implemented Today
The current implementation is strongest in these areas:
- Shared search-query grammar and AST ownership in
packages/api. - Phrase-aware lexical search, regex literals, boolean grouping, negation, and search-term explanation.
- Frontmatter-key existence, value, null, comparison, and nested property queries.
- Field, case-mode, line, block, section, and task-scoped operator execution.
- Sidebar presentation settings and sort options.
- Recent searches, selected-text handoff, copy-results action, canvas indexing, and embedded
queryblocks. - Hybrid lexical plus semantic retrieval infrastructure behind
AppDatabase.
These pieces provide the current user-visible Obsidian search parity target while leaving performance and presentation refinements available for follow-up work.
Remaining Caveats
The implemented parity layer intentionally stays within the app’s current generated search model:
-
SQLite-backed sessions route structured or case-sensitive lexical queries through the shared evaluator over the mirrored in-memory search document set so semantics stay consistent across database backends.
-
Same-block and same-section matching uses text-derived block and heading regions. It does not yet require a markdown parser section record for every match.
-
Canvas search indexes visible JSON Canvas node and edge text, linked files, and URLs. It does not inspect the contents of files referenced by canvas nodes unless those files are indexed separately.
-
Embedded
queryblocks render a compact clickable result list and intentionally reuse the search plugin’s current lexical query path.
Follow-On Refinements
Further work can improve performance and polish without changing the user-visible query contract:
- Lower structured field and property filters into SQLite candidate queries before evaluator scoring for large vaults.
- Prefer cached markdown section metadata for
block:andsection:when all indexed documents carry complete section spans. - Add richer embedded-query block chrome such as result counts, snippets, and sort controls.