Use case: Searching for a note with “à” in its name, can’t use “a” in the query

If I have a note that uses special characters such as accents, Obsidian treats these as entirely different characters. This makes it hard to find such notes with the search function if you don’t know the precise spelling. For example:

If you have a note titled “ànima”, you can’t use the query “anima” to find it. This can become even more complex if there are multiple of such characters in the name.

Proposed solution

To have a toggle switch next to the search bar (maybe it can be en/disabled in preferences for those who do/n’t need it) that lets you treat special characters the same as their “base” version. So typing a in search would also match à, á, â, ä, æ, ã, å, ā, etc.

One simple way to get a partial list of such variations on macOS is to hold down the key and wait for the popup to show up with the possible variations. For example if you hold the a key for a second, a popup shows up with 8 alternate versions of it.

I suppose in the preferences there could be a list of all the characters that you want to associate with the base character. Because this problem can multiply in complexity as you add languages and character sets, making it user customisable might alleviate the implementation burden. So for a you’d have a text-field in which you can add other variations.

Current workaround (optional)

All I can think of now is to not use such characters in the filenames, but this is far from useful.

3 Likes

Use case or problem

In spanish we use to have letters with accent as “gráfico”. So it happens that I can have a note that is called “Gráfico lineal”. But when I use quick switcher I would like to be able to search independently if the letter has the accent á or not. I think it can happen to other languages as well.

Proposed solution

Ignore the accents on the letters when searching with Quick Switcher.

1 Like

The correct solution would be to implement a search in a fuzzy way. I was testing with vim+fzf and it works perfectly when searching for information, in fact I am surprised that obsidian does not use that type of search by default.
Here is a nodejs repository GitHub - wouter2203/fuzzy-search: Simple fuzzy search so creating a plugin or integrating it into obsidian shouldn’t be too complicated

2 Likes

Piggybagging this for similar reasons, the search

“and concentration”

should find the same words in the following text:

its provenance, depending on the type of water use, and the type and concentration of the pollutants;

However, because markdown formatting is not escaped by the search, and the word “concentration” is bolded, one can only find this text passage when searching for the string

“and **concentration**”.

Which makes the search very problematic, because key-words are often formatted in some way.

To that end, formatting should be escaped in the search by default.
I suppose implementing a fuzzy search like giancarloaparicio suggested could have the same result.

I am generally always in favour of fuzzy searching as an option. Maybe even as default search, but at least an option.

To be honest, I am somewhat shocked that obsidian has such limited search capabilities out of the box, because it’s neither fuzzy, nor RegEx-capable out of the box. The latter is somewhat extendable via a plugin, but it requires a unique search box which

  • covers the main screen, instead of popping up at the bottom
  • cannot purely search, as it is build as a search&replace tool. If you want to do a regex-search, you always must replace for something

2 Likes

+1 for this.

In a similar vein, it would be good if search was agnostic about normal and “smart” quotation marks. E.g. currently, if I search for “Administrator’s” (without smart quote) I will not find “Administrator’s” (with smart quote). This makes using the Smart Typography plugin a lot less useful.

1 Like

Great idea !

+1 would love to see this feature

I work with a couple languages that use diacritics, and a number of the titles of my notes have these diacritics in them. It would really make searching for things so much easier if we could search for something without using diacritics but still see the entries that have the diacritics!

1 Like