13
Using fd vs indexed searches (baloo)
(lemmy.world)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
For me the real advantages of baloo are metadata search and KDE integration.
Searching for tags with
baloosearch6 tag:<tag>
is something I use rather often, I even use the star ratings in baloosearches withrating>=6
. Combine that with a mimetype and and you have a quick playlist of all music you rated with 4 or more stars in dolphin:baloosearch rating>=8 AND type:audio
.I also using baloosearch for images....the width and height keys are really useful for finding textures with specific dimension...something like
baloosearch type:image AND Width>=2048 AND Height>=2048
And the of course the KDE integration that makes this really useful...you can use baloosearch queries everywhere in KDE, in open-file dialogs, as bookmarks in dolphin or file-dialogs, for desktop widgets showing folders...you can easily create an activity that has several folder-views on the desktop each showing a different set of files with specific tag...so left folder-view showing all files tagged "WIP" while right folder-view shows all files tagged "Finished" (To use queries in KDE you need them in the form
baloosearch:/?querry=<the querry as you would use it in balooserarch6>
Edit:I wrote a reddit post some years ago about this...hope linking reddit is okay here: https://www.reddit.com/r/kde/comments/pmcshj/tip_baloosearch_kioslave/
Thanks; KDE integration is a big plus. But I haven't been tagging or rating files ... 🙄 so several of these queries are not useful for me. A fuzzy matching based on the whole file name seems to best fit my workflow... and there doesn't seem to be an option to fuzzy match, or match on the whole path in Baloo.
I was hoping dumping a long list of matches to fzf would give me a performance gain (because of Baloo's indexing), but right now the performance difference seems negligible.
Yep, I really don't understand why people use baloo without content indexing...if you do that other means like your fd or even mlocate will probably be better solutions if all you need is filename search. KDE integration is really the only advantage left then...and I don't really see much need of creating bookmarks/folderviews with filename searches, you hardly ever have reoccurring searches for the same filenames.
Baloo only makes sense to use with content indexing in my view...and there it hardly has any equal. I personally can't be without this feature anymore. I use it actively since KDE4 days (anyone remembering nepomuk?) and my whole workflow is built on it.
I would love to have content indexing with full text search in files and emails. I used to run namazu / notmuch mail to index it (back when I would fetch it using offlineimap). But sadly my mail lives on an IMAP server now and isn't searchable locally. And Baloo was simply taking too long to index all my files.
I'm really surprised that an indexed search takes roughly as much time as a directory search. I guess it shows how much the filesystem and tools have evolved... back in the day, a full tree search through even 10GB would be slow and noisy...