Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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:, and task-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 query code blocks as a separate rendering surface.

Current Parity Matrix

Obsidian featureCurrent stateNotes
Plain word conjunctionImplementedRuntime lexical search treats whitespace-separated terms as AND.
Exact phrasesImplementedParsed and normalized through the shared search-query AST.
ORImplementedRuntime evaluation now preserves boolean alternatives.
ParenthesesImplementedGrouped expressions are evaluated through the shared search-query AST.
Negation with -ImplementedNegative clauses exclude matching documents from lexical results.
Regex /.../ImplementedRegex literals execute against searchable fields with case-mode awareness.
Bare property existence [property]ImplementedResolved against indexed frontmatter property records rather than plain text.
Property value match [property:value]ImplementedEvaluated against indexed frontmatter property values.
Property nullImplementedMatches indexed empty, nullish, or empty-array property values.
Property comparisons [duration:<5]ImplementedNumeric, date-like, and fallback string comparisons are evaluated at runtime.
Nested property subqueriesImplementedGrouping, OR, phrases, and regex subqueries run against property values.
file:ImplementedFilters against the indexed file basename.
path:ImplementedFilters against the vault-relative path.
content:ImplementedFilters against indexed document content.
tag:ImplementedFilters against normalized tags, tag parts, hierarchy, and #tag spellings.
match-case: / ignore-case:ImplementedSupported as query operators and through the sidebar match-case setting.
line:ImplementedRuns the nested expression against individual content lines.
block:ImplementedRuns the nested expression against same-block text regions.
section:ImplementedRuns the nested expression against heading-bounded sections.
task: / task-todo: / task-done:ImplementedRuns task expressions against markdown task lines filtered by completion state.
Explain search termImplementedThe sidebar can explain simple AST-backed terms.
Collapse resultsImplementedPersisted sidebar setting.
Show more contextImplementedPersisted sidebar setting.
Sort orderImplementedSidebar supports the documented file and timestamp sort modes.
Recent searchesImplementedEmpty-query sidebar state lists persisted recent searches, and ArrowUp / ArrowDown from the start of the query recall them without leaving the input.
Copy search resultsImplementedThe sidebar can copy grouped search results to the clipboard.
Search selected text shortcut flowImplementedCommand flow opens search seeded with the active editor selection.
Search notes and canvasesImplementedSearch refresh and canvas vault events index .canvas user-visible node and edge text.
Embedded query code blockImplementedThe 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 query blocks.
  • 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:

  1. 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.

  2. 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.

  3. 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.

  4. Embedded query blocks 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:

  1. Lower structured field and property filters into SQLite candidate queries before evaluator scoring for large vaults.
  2. Prefer cached markdown section metadata for block: and section: when all indexed documents carry complete section spans.
  3. Add richer embedded-query block chrome such as result counts, snippets, and sort controls.