Ignore accents/diacritics in search

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.

7 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.

3 Likes

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

3 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

4 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.

2 Likes

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

If we can search case insensitive it would be appreciated to be able to search accent insensitive. Many languages are concerned … but not English (otherwise it would be already available :wink: )

1 Like

+1 this is a must have for non-English languages

2 Likes

For what it’s worth, there is a community plugin that allows to do fuzzy search, look for “omnisearch”

It’s not perfect, but it can help a bit, until the Obsidian team implements this feature :confused:

2 Likes

Use case or problem

I often write text in Frensh, a language where there are quite a lot of accentuated letters, such as é, è, à etc… The problem is that when I search for text those character are not detected as simple letter. For exemple, when I search for “étape”
if the only existing text is etape, it won’t be shown. I find this a little problematic, but I wonder if the community aggrees with me.

Proposed solution

I think the solution is quite easy, in the indexing file, every accentuated words should be deaccentuated. Which mean étape is equal to etape, this would greatly simplify searches and references.

Current workaround (optional)

Related feature requests (optional)

9 Likes

I agree with Seregon; the index shouldn’t take diacritics into account at all. This approach is apparently used by Remnote. Similarly, a very good desktop search engine - DtSearch - uses this approach by default (although there is an option to choose diacritic recognition).

There is another strong reason for this approach. When copying text from scanned and subsequently OCR-ed documents or books, diacritic marks are often not recognized correctly, which means that such words cannot be found.

+1 Although the OmniSearch plugin does it, it should be implemented in the core.

5 Likes

Use case or problem

I’ve got several notes which have local language letters in their name, such as É, Å, Ä, Ö and Ø. However my notes are in English, as is my typing and keyboard. This makes it difficult to open these notes in quick switcher or to locate them using [[]]. For example, a note titled “Cédric” will not be found by typing “Cedric”.

Proposed solution

When looking for a note in quick switcher or using [[]], searching ought to be more flexible. Typing “E” should return notes with “É”, typing “A” should return “Å” and “Ä”, and so on.

Current workaround (optional)

Typing other characters in the note name, e.g. “dric” will return “Cédric”.

7 Likes

I’m surprised that this didn’t gain more traction, as this is a problem i encounter on a daily basis. I think this is a much needed enhancement.
EDIT: Ignore accents/diacritics in search Just noticed that there’s this post that actually gained traction, so I think these posts can be merged.

6 Likes

I worked for a company that provided websites to allow searching of media from multiple countries. The captions were in multiple languages. Ignoring the accents/diacritics was a requirement that was simply expected by our customers.

1 Like

Adding a +1 to this feature, hugely important for many people, users shouldn’t have to rely on plugins for a partial solution.

3 Likes

I’m a developer by profession. Don’t get me wrong, I love Obsidian, and I’m thankful for all work done so far. But this is a bug - OK, a usability bug, but still.

Ignoring diacritics is the implicit, default, de facto expected behaviour by virtually any full-text search engine these days. After all, even English has a few words with diacritics: café, façade, naïve, etc.

PS: thanks for all suggesting the OmniSearch plugin, will try that! :+1:t4:

7 Likes

I gotta agree with you on this one.

1 Like

If you are willing to install community plugins, Omnisearch is a very good one with diacritics search.

My native language is french and I have a lot of notes with “é”, “î”, “è” and many other accent characters and it’s always bad to search something with the native search engine of Obsidian and don’t have any result and have to remember that no result doesn’t mean the note don’t exists.

The only concern about the plugin is because it’s a community plugin so it has access to all my notes which could be a security concern. But the plugin has about 140k download so could be considered as relatively secure based on the popularity factor which is not a decent indicator of security.

I’m constantly thinking about Obsidian synch which is End to End encryption which is very good but introducing a major flaw of security like a community plugin. But Obsidian without community plugin is totally not enough for me and Omnisearch is one of the few exception I choosen like DataView, Excalidraw, AdvancedTables and a couple others.

2 Likes