Fuzzy search for terminal app (+ config with ag, ripgrep, etc)

I use the terminal app as my main driver, which provides great functionality. The main issue I face is that the current search functionality is quite limited, as it seems it requires exact word matching (ie if I search "jopli" it does not return results containing "joplin").

As a terminal user I want to be able to have fuzzy search such that I can have reasonable discovery across my notes.

Furthermore as an advanced terminal user, I want to be able to configure teh fuzzy search command such that I can choose my underlying fuzzy search engine (e.g. ag, rg, etc).

Thank you.

I had a quick look at the search command in the code and it seems this is partially supported, namely the code gets executed with a SQL LIKE query [1] [2].

Additionally any * symbols get replaced with %, which means that this could be used when searching - given it's a LIKE query it's also possible to add - to exclude particular words [3].

To be honest I was looking for more of an FZF / Ag functionality, however indeed given that the search is carried out on the postgres results as opposed to my initial assumption of being on the filesystem, it would be cumbersome to implement (ie similarity search UDF, etc).

Knowing this I can continue to use this approach to leverage some basic fuzzy-search functionality - thanks.

References (replace [DOT] manually as links can't be provided):

[1] github [DOT] com/laurent22/joplin/blob/1fcfa9c591940a3763b502d3f70b328104208977/packages/lib/models/Note.ts#L439-L451
[2] github [DOT] com/laurent22/joplin/blob/1fcfa9c591940a3763b502d3f70b328104208977/packages/lib/BaseModel.ts#L317-L328
[3] sqlite [DOT] org/fts3.html

1 Like