Bug 431588

Summary: Baloo indexing files in hidden folders or not...
Product: [Frameworks and Libraries] frameworks-baloo Reporter: tagwerk19
Component: generalAssignee: Stefan Brüns <stefan.bruens>
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs
Priority: NOR    
Version: 5.78.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.79
Sentry Crash Report:
Attachments: Mockup with "Index selected hidden folders" checkbox

Description tagwerk19 2021-01-14 10:16:36 UTC
SUMMARY:

    Baloo has the option to "Index hidden folders" (as an option
    in .config/baloofilerc and presented in the System Settings
    'Search' page.)

    This seems to work "as if" it means index hidden files

STEPS TO REPRODUCE:

    Create a hidden folder

        mkdir .test

    and create a testfile in it

        echo 'Hello World' > .test/testfile

    Enable "Index hidden folders" in System Settings > Search; run
    "balooctl monitor" in a separate window to see what's happening
    and then "balooctl purge" to make sure everything is reindexed.

    Search for the file by filename or by content

        baloosearch testfile

        baloosearch "Hello World"

OBSERVED RESULTS

    Nothing is found

    If the file is copied to ~/Documents, it is then indexed and found

    If the .test folder is explicitly added to Baloo's folders list
    then the file is found (this seems to override the 'Index hidden
    folders' flag)

EXPECTED RESULTS

    Expect both searches to find the file

SOFTWARE/OS VERSIONS

    Neon Testing

    Baloo : 5.79.0
    Plasma : 5.20.5
    Frameworks : 5.79.0
    Qt : 5.15.2

ADDITIONAL INFORMATION

    There is scope for confusion here.

    If the option is "Index hidden files and folders", you can see
    people would expect that baloo indexes the folder content
    (whether filenames or free text)

    It is not "discoverable" that you can (or that you need to) include
    a specific hidden folder in the indexing criteria.

    Maybe the options should be "Index hidden files" together with a
    "Show hidden folders" that has a hint/tooltip that says select
    the folders you want indexed.
Comment 1 tagwerk19 2021-01-14 21:44:32 UTC
I find it a good compromise to have to explicitly give the 'hidden foldername'. It makes sense to have to specify .config rather than 'all hidden folders' and find you are suddenly indexing all of .cache

The trouble is how people find out about that. It's probably a usability thing.

That's why I aimed the report at the System Settings > Search panel

(I can never work out what components are responsible for what)
Comment 2 tagwerk19 2021-01-17 13:33:22 UTC
Created attachment 134967 [details]
Mockup with "Index selected hidden folders" checkbox

Maybe this is a possible solution.

It separates out the indexing of hidden files from the hidden folders (that need to be explicitly included in the baloofilerc file). It sidesteps the implication that all hidden folders are indexed 

The "Index selected hidden folders" option would need to make the hidden folders visible so that they can be selected

The dialog is perhaps a bit weak in showing that normal folders can be included/excluded
Comment 3 Nate Graham 2021-01-25 19:19:16 UTC
Should be fixed by Stefan Brüns with the commits in https://invent.kde.org/frameworks/baloo/-/merge_requests/37/commits in Frameworks 5.79!
Comment 4 tagwerk19 2021-01-27 13:47:54 UTC
That works for me. Checked with .test folders and a general "index hidden folders" and including .test as a specific folder. Thanks!

Setting the general "index hidden files and folders" indexes all hidden folders, just as it "says on the tin". It means you get things like .cache, all thumbnails for example, which could be more than you were expecting...

I think it's worth making the option to index a chosen hidden folder more visible - should just be flagged "wishlist" though.