Partial search without the asterisk

From my experience the thing that confuses non-technical users is the (lack of the) partial search. People got used to real-time partial search, especially on mobile devices.

It is a huge show-stopper for them to type an extra asterisk at the end of the term. Also not being able to search for substrings within a word.

This is just not intuitive for non-technical people.

No doubt that the current search implementation is a powerful tool, but if we want to target less technical users and I wish we do since Joplin is a really awesome and outstanding product we need to support “easy” searching, just out of the box.

What do you think @laurent?

Or is this part of the search engine project?

Fuzzy search will do what you need. It is mentioned in the project you linked so hopefully we’ll have it soon!

Fuzzy search with the spellfix extension of SQL won’t support this use case.

Fuzzy matches are based on edit distance. Two words are similar if they can be transformed from one to the other with a minimum number of edit operations (removal, insertion, or substitution of a character in the string).

Eg. xpresso and espresso are 2 edit distance apart. (Replace x with s and insert e at the front)

But words that have large edit distances won’t be matched by a fuzzy search.

I think what @hunhejj expects is to type ‘psy’ and have it match to ‘psycho’ ‘psychiatry’ and even ‘psychotomimetic’.

And this can be done by simply appending a ‘*’ at the end of all search terms by default.
So if you search for psy, the search will actually be for psy*.

Maybe we can exclude this behavior from quoted string. So "psy" won’t have any * appended to it.

Let’s see what @laurent thinks of this.

This may cause a problem if you have a large set of notes. Suppose you want to search for psy. But if the search is triggered the moment you type p, a large number of search results will be generated (all the words beginning with p). If the search runs asynchronously, there may not be a problem, otherwise I think the app will hang.
What do you think about this, @naviji?

Maybe async combined with debounce?

Yes, ideally I expect that typing ‘berry’ should show me the note containing ‘RaspberryPi’. Or at least ‘rasp’ should resolve to ‘RaspberryPi’ if searching for a substring remains impossible.

@laurent ?

That would be tremendously useful. Any update on that feature?

1 Like