Establish a unified search API as a platform-level service

Use case or problem

Note search popups should be standardized across the Obsidian platform.

Currently there are multiple different / conflicting ways to search:

  • quick switcher
  • wiki link popup e.g. typing [[note name creates a popup fuzzy matching the note name

(the actual search function in the sidebar is out of scope since it does not produce a modal)

Additionally, plugins implement their own vault search capabilities from scratch, which leads to sub-optimal UX as we now have at least three different search modals to contend with. See the Journey plugin discussion for an example, as that plugin does not implement fuzzy searching and has a limit on the number of notes that can be displayed: New Plugin: Journey - Find the story between your notes - #91 by davecan

This is important because Obsidian is a platform not a single app. It supports an ecosystem through its plugins, and ecosystems depend on platform services.

See: Bits or pieces?: On Platforms and Ecosystems

Obsidian is a platform enabling access to atomic data elements called notes. Understanding this can provide tremendous power and capability to users and dramatically expand the options for the Obsidian team.

Unified search API is a platform-level service.

Proposed solution

Standardize on the following:

  • Establish a single method of interpreting search terms
  • Establish a single method of formatting search results

Establish hooks in the plugin API that allow plugin devs to hook into the search capability and provide search input to a standardized interpreter which returns standardized results. Output ideally should look like the wiki link popup search results.

The actual popups themselves shouldn’t have to change their appearance in any way, i.e. the quick switcher modal and the wiki links popup can still appear as they normally do, but how the search is interpreted and how the results are formatted should be consistent across the app.

This would standardize how searches are performed and enable plugin devs to hook into the Obsidian platform capabilities.

Current workaround (optional)

None.

Related feature requests (optional)

2 Likes

Thanks for your thoughts on this. Is FuzzySuggestModal not what you’re looking for?

It is what e.g., my Workbench plugin uses when changing to a new destination note.