Global search: Sort search results by relevance (and what relevance is)

Use case or problem

Currently, when you search for something, your search term is split by spaces, and each keyword is searched for individually instead of being treated as a combined search.

Some might suggest using “Full-Text Search” by enclosing your search term in quotes, but that’s not the solution here. The current search is a strict perfect match system, requiring your search terms to match the text exactly. For example, if you miss a single s at the end of a word, it won’t find what you’re looking for.

Here’s an example of quoted full-text search:

And here’s one without quotes:

Note that I left out about 200 completey useless results until I got to the pretty much perfectly matching headline???

Proposed solution

  • Fuzzy Matching: Find results even with typos, minor spelling variations, or singular/plural differences.

  • Semantic Search: Understand the meaning of words to match related terms and synonyms, like finding “quantification” when searching for “quantifiers.”

  • Relevance-Based Ranking: Show the most relevant results at the top based on context and importance.

Here’s some extra food for thought:
Enhance the Quick Switcher by combining it with the improved search. If no files match the search term in their names, extend the search to include the content of the files and display those results as well. This would make it easier to find what you’re looking for, whether it’s in a file name or within the note itself.

7 Likes

Couldn’t agree more, this is my biggest complaint with Obsidian is the complicated search. Excellent breakdown of problem and solution. Wish this was higher on the priority list for the Obsidian team to fix.

2 Likes

It shouldn’t even be a “feature request” it’s about a critical component. This is about searching notes in a note taking app :sob:.

2 Likes

Big plus to this. Search in Obsidian is a daily struggle

1 Like

This exactly, :100::exclamation:

Just last night I was trying to find a very unique quote that would not be duplicated anywhere in my vault, and for the life of me couldn’t retrieve it through search. I used all the right keywords but it wasn’t popping up. I had to manually go through folders (of which I don’t have many due to the whole point of Obsidian) I thought it might be in and look for the note title hoping I’d remember it. Thankfully I did remember, but it was a 5 minute process (killing conversation momentum), where it should have been mere seconds with a good search function. This is getting worse as my vault grows. It feels like I need to go back to heavy folder organization so I can actually retrieve items. This should not be the case! I heavily tag and back link, yet this seems to be of no real help retrieving info as Obsidian’s relevance weighting seemingly could care less about these.

Please, someone from the Obsidian team jump in here and provide perspective and response. I don’t understand why this hasn’t been addressed or prioritized. I can’t imagine using another note system, and happily support Obsidian with my sync subscription and catalyst payment, but I’m seriously getting frustrated not being able to retrieve critical info through search. Like the above quote said, I fear I am going to truly lose info the longer time goes on as I will simply not remember how to manually find it.

1 Like

+1 I agree about the foundational importance of good search.

Just jumping in though, I’ve seen a few times where people had case sensitivity turned on, and couldn’t find a known phrase.

It sounds very strange that you should have trouble funding something so unique and known. Rigmarole’s suggestion about case sensitivity sounds likely. Especially on mobile it’s easy to accidentally tap the case-sensitive button in the search box and not notice.

If that doesn’t clear up enough of your search troubles, it might be worthwhile to start writing down examples when they happen (including detail about what you’re seeing) so people can suggest different approaches and the team can have data about what’s not working for people.

Besides that there are many, many feature requests, it could simply be that many people aren’t having the same experience. When a problem is important to us it can feel like it must be universal, but it isn’t always.

1 Like

quick drop-in: I agree that this is very detrimental to my work - searching for an exact match is critical, especially in a meeting where I need to quickly share a definition with a colleague, on top of working alone would save me a lot of time. The fact that exact matches are not prioritized in sort is quite astonishing. The next order of sort should be hashtag matches, heading matches (decreasing # → ##), then callout title matches.
Coming from CLI with fzf being my core navigation tool that really frees me from having to think about any structure, maybe there are inspirations or integrations to be found there. Going to CLI and fzf for a particular phrase is infinitely faster than having to search in obsidian, while I can only open the query match in $EDITOR and not obsidian for lack of a command line call to open a specific file (obsidian {filename} does not work). Not being able to effectively navigate text in a text-based knowledge base is becoming one of my primary motivations for switching my workflow to CLI/neovim entirely, if not for obsidian’s nice support for math render and inline images.

I’m not from the team, but, did you know that this feature is on the roadmap?:
“Sort search results by relevance”

1 Like