Remove strict word order requirement in Quick Switcher and Link Suggestions

Use case or problem

When using the Quick Switcher and Link Suggestion popups, results only show when the word order is correct. For example, If I am searching for the note “Introduction to Blender.md”, typing “Blender intro” will not land a result. Entering “int ble” / “in b” / etc works great (thanks fuzzy search!), but often we don’t remember the particular order of words in the note title.

In the search pane, results are found as expected, regardless of search term order.

Proposed solution

Allow for non-strict word order in the Quick Switcher / Link Suggestion popups.

Current workaround (optional)

Move to the search pane to find notes that aren’t showing up in the popup’s search results.

23 Likes

In addition:

  • Items matching the order of search phrase could be ranked higher to show earlier in suggestions list.
  • Searching “phrase with strict order” should still be available e.g. by enclosing the phrase in quotation marks.
1 Like

Yeah that would work nicely malecjan.

Licat actually replied to this in Discord:

“For now, it’s designed like that on purpose. Including the reverse order (or any mixed ordering) makes the search results way too noisy (at least with fuzzy search), because now suddenly it’s matching a ton more things.
There might be other ways to add the reverse order though, like non-fuzzy
could consider that later”

But I wonder how problematic this additional noise would actually be? If results are too noisy, it just requires a bit more specificity, right? Of course I can’t test this, so perhaps it would indeed be unruly… but the problem exists that these searches require memorising the term order – While I think that “Blender Intro” really should find results for “Introduction to Blender”.

4 Likes

Current workaround (but nothing more) is to generate few permutations stored as aliases in YAML header. But that is feasible only for very small number of files or could be done programmatically.


This feature request would also help to solve Improvement to link suggestions - allow narrowing to folder while searching by allowing to filter the folder without need relocate caret to the beginning of the search string.

1 Like

Are there any updates to this idea. I run into this issue on a daily basis where I just remember the important keywords that I expect in the title but not their exact order. I even tried to use the Quick Switcher++ community plugin hoping it might have this feature, but it seems to work the same way as the core switcher, I started a discussion on it’s Github repo, hoping they might implement this. Currently the only workarounds I think work are to add the important keywords from the title as tags inside the note, and then search using tag: search option, or using the file: search option to search by file name only, which seems to not be limited by keyword order.

2 Likes

Use-case or problem:

I frequently fail to find the file in quick switcher and then have to copy or retype the search terms into global search pane which is tolerant to word-order but also ignores text-level (filename = alias = chapter heading = … = marginal mention). This double effort is intrusive.

Proposed solution:

  1. Implement Allow Multiple search panes at the same time .
  2. Bind hotkey Ctrl+O to “Open new search-pane”.
  3. E.g. add new sorting option that prioritizes by text level (filename>=alias > chapter heading >…> marginal note). I.e. will first list results matching in filenames and aliases like current quick-switcher, then followed by results matching in file contents like current global search. Or e.g. display two columns, one corresponding to quick-switcher and one to ordinary results so I can click left or right to preferred match. Or …
1 Like

This feature is crucial to me. How can we move ahead with this feature? I would like to see for myself if the results “will get too noisy”. An idea would be to implement it as an experimental feature for now, and then let the user have the option to switch it on in the settings menu. Then they can test for themselves. Let me also know if I can help implementing this feature!

There are a couple of plugin that offer alternative quick switcher. You can create another one or extend one of those.

1 Like

Thanks @WhiteNoise! I found a plugin that seems to work perfectly!

I will have to test it more. But so far it seems to be exactly what I was looking for :grin:

5 Likes

This plugin is great, as it allows alternative to using [[ as well, as same problem there! Frequency and recency makes a big difference in constant false positives coming up.

Use case or problem

When using the link suggestion popup to create a link to an existing note, the current fuzzy search algorithm is slightly too restrictive. It produces zero results for some very reasonable attempts at a match.

For example:

  • Where's my music collection note about [[The Ramones
    does not match a note titled Ramones. (Did you know that’s the actual band name?)
  • Where's my recipe for [[how to cook spaghetti squash
    does not match note how to make spaghetti squash

Problem: the current fuzzy search algorithm requires a match for all search terms, with no fallback to a less restrictive search.

Drawbacks: If I’m certain that my desired note exists, I have to try to remember what else I may have titled it and try again. If I’m not certain it already exists I may create a redundant note, wasting time and cluttering my note collection.

Requiring a match for all search terms makes sense for Obsidian’s file search engine but not for link suggestion. File search happens in a search box where users are intentionally constructing boolean queries. Link suggestion happens in the context of natural language. It’s a similar but distinct UX case.

Proposed solution

If there’s no match for all search terms, fall back to a match on fewer search terms. Results with more matching search terms rank higher.

Secondarily, results with longer matching search terms rank higher. (This is an optional but probably useful optimization for ranking ‘substance’ words higher than words like the and as of etc…)

Related feature requests

This pairs very well with @ShaneNZ’s feature request for when you want to link a phrase you’ve already written. The link suggestion UX for that case is currently broken, i.e. there is no link suggestion.

7 Likes

Here’s my similar request for improvements to fuzzy searching in Quick Switcher and Link Suggestions.

(edit: fixed link)

Is there any way to disable case matching when searching? I dont typically want to have to get the uppercase first letters of titles correct to find them, but that seems to be required.

@dsteinbock have you noticed this?

Hmm, actually I’m not seeing case match being a requirement. Maybe I’m not understanding, or maybe you found a bug or an edge case. Can you give a specific example?

I would like to bump this thread. I’m also finding the search matching to be too restrictive.
I’m a transplant from roam, and the results are more intuitive.

comparison with roam using the same data

aside:
Is there a way to default the search results to condenced mode?
From this:


to this:

2 Likes

Thanks for mentioning obsidian://show-plugin?id=obsidian-another-quick-switcher . Seems like a perfect solution on first look. It is also actively developed, last change 4 days ago.

is that plugin able to replace the default [[ dialogue to enable results for reverse ordered search terms? If so, can you tell me how to enable it… i can’t seem to find a setting to make it do so.

Sorry, no idea. I suggest you look if the plugin has some kind of support resources.

1 Like

this is a game changer. Thank you.

I support this. Because of this lacking feature I created several notes twice.