Sort search results by relevance (and what relevance is)

@lumenwrites : I do not have that experience. At my end Search works well, and words between quote marks represent a specific word combination that Obsidian searches for an finds. If, in your example, there is a note that has make it work but in a phrase like make it bloody work then Obs will not list it in your make it work query.

Furthermore, Obs Search also supports the very powerful regular expressions - Regex.

Use case or problem

When I search, generally I want the search to display items with the search in the title first and then other items below. The logic, often I’m using search to find a note that I know exists or I think should exist. Mentions of my search inside a note should be second because they’re less important.

Proposed solution

Either make this the default functionality or give us an option to affect the search.

Current workaround (optional)

None.

Version: 0.13.19
Installer: 0.12.15

4 Likes

+1 to this.

Even an opinionated way of doing relevance/best/score/whatever-you-want-to-call-it would be helpful for me. e.g. if I search for John Smith, then a note with “John H Smith” on one line should rank above a file with “John” on line 2 and “Smith” on line 180.

+1 for this. While relevance is indeed subjective to some extent, there are some clear rules which should work for everyone (else search engines like google would have no reason to be). A number of elements can be already considered in the note structure (such as title levels) and content (occurrence count, results position) to already provide an initial ranking likely to prove more effective than simple alphabetical ranking.

Furthermore adjusting the current odd default search settings seems necessary to me. Searching for “it” for example will bring up position as a result simply given position contains it. While there are some rare cases in which matching that way can be useful, it is usually not useful and simply clutter the search results (it could always be included, but then should be addressed as a less good match as if the exact term are found).

Searching through a vault is getting more critical as time goes and our vaults grow, and this is the last part of the software preventing this tool from going from excellent to exceptional!

(as a +1 including the ability to also include search query matches found in images in the search results similarly to Onenote would also further improve search)

1 Like

+1 from me. The OP’s simple logic seems to be a huge advance over the current functionality (which later can be improved with AI and more advanced search algorithms). As suggested by many, an idea could simply be to keep the current search algorithm, but let the user select among many. Like a drop-down list where I could choose which method of searching I would like to use.

For me this (improved/highly functional search capabilities) really is a key/core feature. The whole point of Zettelkasten is to not have to care about organizing your notes, but merely feed them to the system and design them in ways that they can be found in different contexts later when they have been forgotten. As Obsidian currently works, this is not the case. I often have to scroll down to the bottom of the search results to find a note that I REMEMBER exists (despite adding as many relevant tags AND filenames AND headlines as I can - with the purpose of making the note as “findable” as possible). This means that I am GUARANTEED to not be able to find notes that I no longer remember exists in contexts where I have tried to design them to be found - which is detrimental for the Zettelkasten method (which, as I understand it, is the main use case of Obsidian).

3 Likes

This.

Evernote is still king in this domain; search is everything.

2 Likes

I’d chip a+1 in for this one.

Coming from TiddlyWiki, the search there gives me what I need in the first few hits. In contrast I find the Obsidian search frustratingly bad. With several hundred files, results that should be clearly at the top are buried halfway down the list of irrelevant hits.

It doesn’t need to be the “perfect” way of sorting, just a better-than-alphabetically.

+1 to this request.

The more notes we accumulate, the more helpful a feature like this can be.

+1 obsidian search is infuriating as is

1 Like

+1 here. I’m increasingly frustrated on how hard it is to find the notes I want.

As a additional suggestion, relevance of a note could also be determined by the number of notes that link to it.

2 Likes

+1
The more notes I have the more annoying is the search function. Not even able to sort by number of occurences ? Really ?
Some logic to “relevancy” would also be appreciated - proper search function is really important.

1 Like

+1
I start having so many notes that searching for texts (even using some folder / tag filters in the query) returns me a nearly unusable list of results.

Actually worse : sometimes a note contains the exact search string in the title and somehow doesn’t even make it close to the top of the list, so even when knowing the exact title it’s sometimes too slow to search for it.

Absent the capacity of having semantic links and search, it becomes hugely important to be able to customize the relevance score of searches or have more refined search queries

1 Like

I’ve been wanting this for so long, and I just came across this plugin which goes a long way toward meeting the requirement: Omnisearch
obsidian://show-plugin?id=omnisearch

1 Like

I suggest to use Omnisearch, turn on arrow keys to tap straight down to the bottom result, set and build the habit of ctrl+enter to select.

Still not great but it’s a bit better

I agree that the search results should be configurable to show exact matches in the title first. Maybe a filter so you can select “In filename only” where you can pick “Filename A to Z” as a secondary check box.

3 Likes

Just adding a link to this Help thread. The “Move current file to another folder” command could also use some relevance sorting. In this example, a perfect match shows up lower in the list of matches.

And folder searching doesn’t seem to support quotation marks, or any way to filter a more exact match. At least in that particular example. It might search by shallowest-depth-first?

3 Likes

Please. Search is so awkward right now.

1 Like

I am a diehard Obsidian supporter and fan, cannot imagine using another note app. But this is the biggest issue I have with it. Searching one’s large vault is one of the most important functions for data management and retrieval in PKM systems.

I really, really dislike having to type "'s around phrases I am searching for, especially on mobile. I have not seen an adequate workaround. Omnisearch is not a solution for me due to two reasons:

  1. It’s not any better with this issue
  2. While I use and value many plugins, this should be a stock search functionality

I don’t understand why this is not resolved yet. Anyone from the Moderators able to bring this up to the Obsidian team?

1 Like

Just to keep it alive :wink: I agree. We need this function!!!