Bug 433967 - If Baloo content indexing is disabled, but Baloo is enabled, searches immediately return 0 results
Summary: If Baloo content indexing is disabled, but Baloo is enabled, searches immedia...
Status: RESOLVED WORKSFORME
Alias: None
Product: dolphin
Classification: Applications
Component: search (show other bugs)
Version: 20.12.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-04 19:42 UTC by The Feren OS Dev
Modified: 2024-08-06 03:46 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Baloo KCM (70.63 KB, image/png)
2021-03-06 01:06 UTC, The Feren OS Dev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description The Feren OS Dev 2021-03-04 19:42:36 UTC
SUMMARY
If you turn off Baloo File Indexing overall, but keep Baloo enabled, and then search for files in Dolphin it'll immediately finish with 0 results, irregardless of if there's actual files to find that match your query.

STEPS TO REPRODUCE
1. Turn off indexing file content and folder-specific indexing in File Search KCM
2. Keep Baloo itself enabled
3. Apply, and perform a search in Dolphin

OBSERVED RESULT
Search immediately finishes with 0 results

EXPECTED RESULT
Search would continue using the filename search service if not Baloo searching by filenames.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE neon 5.20.5
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Turning off Baloo entirely makes search work by using the other engine for searches.
Comment 1 Nate Graham 2021-03-05 19:50:53 UTC
How do you turn off indexing but leave baloo on? Which settings specifically did you change? Can you show a screenshot of your baloo KCM? THanks
Comment 2 The Feren OS Dev 2021-03-06 01:06:20 UTC
Created attachment 136420 [details]
Baloo KCM
Comment 3 tagwerk19 2021-03-06 08:15:42 UTC
I'd check whether baloosearch is finding results for you. See if

    baloosearch yourfilename

works. If it does, go back and have look at your Dolphin search, maybe you are hitting the UI confusion; bug 431240

If you have content indexing turned off and you are searching in Dolphin for a filename, you need to click on the "Filename" button (and maybe also "Your Files")
Comment 4 Nate Graham 2021-03-06 17:28:05 UTC
OK so based on that screenshot, it should be indexing filenames only, not content.

Cannot reproduce, FWIW. I will echo the suggestion to try `baloosearch` and see if that works.
Comment 5 Bug Janitor Service 2021-03-21 04:33:49 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 The Feren OS Dev 2021-03-28 13:55:24 UTC
dominich@dominic-80e5:~$ baloosearch adwaitrecolour
Elapsed: 0.449031 msecs
dominich@dominic-80e5:~$ ls ~/Downloads/adwait*
/home/dominich/Downloads/adwaitrecolour
Comment 7 The Feren OS Dev 2021-03-28 13:56:16 UTC
Update: Upon now changing directory to the Downloads folder, I get this:

dominich@dominic-80e5:~/Downloads$ baloosearch adwaitrecolour
/home/dominich/Downloads/adwaitrecolour
/home/dominich/adwaitrecolour
Elapsed: 4.25353 msecs
Comment 8 The Feren OS Dev 2021-03-28 13:56:51 UTC
...and now Dolphin search works, too... weird.
Comment 9 The Feren OS Dev 2021-03-28 13:59:33 UTC
I'm also getting weird behaviour in /, though, despite this:

dominich@dominic-80e5:~/Downloads$ cd /
dominich@dominic-80e5:/$ baloosearch hosts
/home/dominich/Games/sonic-3-angel-island-revisited/drive_c/windows/system32/drivers/etc/hosts
/home/dominich/Games/fortnite/drive_c/windows/system32/drivers/etc/hosts
/home/dominich/Games/epic-games-store/drive_c/windows/system32/drivers/etc/hosts
Elapsed: 1.82707 msecs

dominich@dominic-80e5:/$ ls /etc/host*
/etc/host.conf  /etc/hostname  /etc/hosts  /etc/hosts.allow  /etc/hosts.deny
Comment 10 The Feren OS Dev 2021-03-28 14:01:15 UTC
...and in Dolphin, searching 'hosts' in / produces NOTHING as before.
Comment 11 tagwerk19 2021-03-28 21:22:06 UTC
Some ideas....

... the results in Comment 6 and Comment 7 don't make much sense to me when put side by side

    A plain and simple "baloosearch" doesn't mind where you are when you
    call it, it should give you the same results.
    If you want to filter results by directory, there is a "-d" option.

        baloosearch -d Downloads adwaitrecolour 

    You can try

        balooshow -x ~/adwaitrecolour"

    and

        balooshow -x ~/Downloads/adwaitrecolour

    That will shows you what information baloo has for each file.

    I'm guessing you might have loads of subdirectories and baloo can hit
    a system limit. You can what the limit is with:

        sysctl fs.inotify.max_user_watches 

    If this says 8192 and you've got more than about 8000 folders then
    the indexing will go wrong. You can increase the limit following:

        https://bugs.kde.org/show_bug.cgi?id=433204#c12

    It may also make sense to purge the database and start again "clean"

        balooctl purge

... For Comment 9

    As above, a plain and simple "baloosearch" doesn't mind where you are
    when you call it, it looks up its index. If you

        cd /
        baloosearch hosts

    You'll just get hits just from the folders you've indexed. Assuming
    you've got

        folders[$e]=$HOME/

    in your .config/baloofilerc then you are indexing your home folder
    and below (and if not specified, that's also the default)

    You can experiment with telling baloo to index "/" (without indexing
    file content) but you'll very much need the increase in "max notify
    watches"

... For comment 10

    A search from "/" in Dolphin probably isn't using baloo

    You can search from "/" is dolphin but it walks through the filesystem
    looking for things that match - that can take a while (You'll see a
    "searching" annotation in the bottom right of the dolphin window)

Hope I've got this right - and hope this makes sense!
Comment 12 tagwerk19 2024-07-07 07:51:04 UTC
(In reply to The Feren OS Dev from comment #2)
> Created attachment 136420 [details]
> Baloo KCM
I've revisited this and I've not been able to remove the home directory from the indexing (any more...), maybe it's been fixed so you can no longer shoot yourself in your foot this particular way.

I would say though, your config settings make sense although they might not bring you anything. There nothing wrong, per se, have Baloo running but not currently indexing any folders, it just takes a bit of memory and doesn't do anything.

Dolphin looks at the baloofilerc file to see if it should send the query for a particular folder to Baloo or do a "there and then" search itself. That's a bit of double guessing and maybe it got it wrong.

The behaviour now is if you remove the include entries from ~/.config/baloofilerc, indexing seems to assume $HOME. This is on Neon, Fedora has its own set of hardwired directories (~/Documents, ~/Pictures, ~/Music and ~/Videos).

The other explanations given in Comment 11 still stand I think. Let me know if these cover your problem or we need to do any more troubleshooting.

Setting to "WaitingForInfo" in the meantime, add a comment and reset if you want to keep the issue open.
Comment 13 Bug Janitor Service 2024-07-22 03:46:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Bug Janitor Service 2024-08-06 03:46:32 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.