Skip to content

ObsidianSearchQuery

Unofficial

A parsed Obsidian search query, compiled from a raw query string into a matcher. Used by global search, the file explorer filter, and backlink search.

Import:

import type { ObsidianSearchQuery } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ObsidianSearchQuery

Properties

PropertyTypeDescription
appAppReference to the app.
caseSensitivebooleanWhether the query is matched case-sensitively.
matcherunknownThe compiled matcher for the query.
querystringThe raw query string.
requiredInputsunknownThe inputs the matcher requires to evaluate a file (e.g. content, tags).

Methods

MethodReturnsDescription
match(file, content)unknownMatches a file (and optionally its content) against the query.
matchContent(content)unknownMatches content against the query.
matchTag(tag)unknownMatches a tag against the query.

Links to this page: