Background
I have been using the Search functionality within the Dolphin file manager for KDE Plasma increasingly recently; however, the speed with which the results would show up left much to be desired. I went looking for faster options and chose Baloo indexing with KRunner, which runs a lot faster than Dolphin crawling through the directories on every search.
Setup
Step 1: Check the current state
balooctl6 status
If it says “not running” or “could not be opened,” proceed below.
Step 2: Reset the indexer
balooctl6 disable
rm -rf ~/.local/share/baloo
balooctl6 purge
balooctl6 enable
Then verify:
balooctl6 status
You should see “Baloo File Indexer is running”. I got the following output.
Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 9,102
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 5.94 MiB
Step 3: Enable in System Settings
Once balooctl6 status shows it running, go to System Settings → Search → File Search and do the following.
- Check Enable File Search.
- Under “Data to index,” select Filenames.
- Make sure your home directory is in the indexed folders list
Components
Here is a tabulation of the division of labor.
| Component | Role | Manifestation |
|---|---|---|
| Baloo | Background daemon that scans your disk and builds a searchable index of file/folder names (and optionally contents) | The database |
| KRunner | The popup bar you invoke with a hotkey; you type a query, it asks Baloo, shows results | The search box |
| Dolphin | The full file manager GUI; opens when you click a result to actually browse/navigate | The file manager |
Result
The searches are so much quicker now. Previously, I needed to open Dolphin and go to the search button, and after entering the query, I would have to wait for the crawling across directories to proceed. Now, there is a persistent SQLite database (that gets updated automatically as I add new files, change the folder structure, etc.) that is swiftly queried with the help of the shortcut Alt + Space.
The search outputs results from Applications, Folders, as well as Browsing History. This is beyond what I was going for, but is much welcome. Only if nothing appropriate is found does a suggestion for running a web search appear (unlike a certain annoying spyware OS, which searches poorly within, and is always eager to use Edge.)