Search with underscore?

  • Version: 2.6.10
  • OS: Same situation in all OS (Windows, Linux)

Hi, recently I found following symptom when I try to search word with underscore ("_")

let's assume that the word that I search is "__func__".

when I just type __func__ in search text box:
=> search results include notes including "func" or "__func__", it seems that "_" is ignored but if a note includes "__func__" all "__func__" in the note are still highlighted.

when I type /"__func__" in search text box:
=> same results as [1]

if the title of a note include __func__ it appears top of search results.
I don't understand why [2] does not work, it should work according to help.

it there anything that I miss ?

Fro the documentation

One drawback of Full Text Search is that it ignores most non-alphabetical characters. However in some cases you might want to search for this too. To do that, you can use basic search. You switch to this mode by prefixing your search with a slash / . This won't provide the benefits of FTS but it will allow searching exactly for what you need. Note that it can also be much slower, even extremely slow, depending on your query.

Try the following search /__func__ to perform a basic search

1 Like

Hi Jack

I have already read Joplin - an open source note taking and to-do application with synchronisation capabilities, and I have already tried /__func__, but it has same results... :disappointed:

Fo me it's not the same result.

But the /__func__ finds some thing in the welcome message ...
Think this would have to be looked at more closely, why this happens


what I mean is that /__func__ and /"__func__" produces same results..

if a note includes __func__ in its title and body, it appears top of search results.
but if a note includes __func__ in its body only, it does not appear top of search results (it seems that search engine does not search __func__ in body part of note)

in other words, if some notes include __func__ in their title, those notes appears top of search results.
but if they don't they don't appear top of search results regardless of search string (__func__ or /__func__ or /"__func__")

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.