Bug 353193 - Don't blindly index any folder.
Summary: Don't blindly index any folder.
Status: RESOLVED INTENTIONAL
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-25 19:53 UTC by Hussam Al-Tayeb
Modified: 2017-11-12 14:25 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hussam Al-Tayeb 2015-09-25 19:53:45 UTC
I think by default, baloo should look for ~/.config/user-dirs.dirs and only index the folders in that file.
That file defines the location to standard Music/Documents/Desktop/Videos etc.. folders.
If that file is not found, just fall back to current behavior.
This not only makes indexing faster but more importantly indexes only relevant folders.
Users can always add additional folders.

Reproducible: Always
Comment 2 Hussam Al-Tayeb 2015-09-25 19:59:41 UTC
There is also /etc/xdg/user-dirs.conf so there can be default directories too for distributions that want a refined out-of-the-box experience with default indexed folders.
Comment 3 Andreas Sturmlechner 2015-09-26 12:31:45 UTC
This would essentially change it to a whitelist approach, so the kcm would need to be changed to reflect this.

Btw similar bug just less detailed: https://bugs.kde.org/show_bug.cgi?id=352487
Comment 4 Hussam Al-Tayeb 2015-09-26 13:12:30 UTC
Correct, and with initial defaults.
I think this approach will make things more simple as it will be closer to how a new user is likely to expect things to operate by default.
Comment 5 Lukas Ba. 2017-01-03 01:19:49 UTC
Please don't.

> This not only makes indexing faster but more importantly indexes only relevant folders.

What is relevant or not is up to the user. I'd argue that folders created by the user themselves are more relevant for a person than standard folders predefined by the distribution. Many don't use the "Documents-Downloads-Pictures" stereotype.

Most users will not expect this behaviour, much less such a change in behaviour.
Even if you know about it, having to add a newly created folder to the whitelist is easily forgotten, and annoying.

The performance argument isn't relevant.
If a user has big data that is causing performance problems and stores them in ~/Documents it will cause performance problems, and this suggestion would not change anything about that. The better way of handling this big data would be to blacklist it explicitely.
If a stereotypical user doesn't have any folders besides the user-dirs.dirs, this won't improve performance either.
Comment 6 Nate Graham 2017-10-27 18:52:12 UTC
A whitelist approach  will lead to an endless stream of "Why isn't my file indexed?!?!" bugs that the GNOME Tracker people see, as their system does just this. Any user who creates new folders in ~ will not know that they'd need to manualyl add them to the whitelist, leading to confusion.

If there are performance problems in Baloo, we ought to fix them, not work around them in a way that will frustrate users and introduce new bugs that will compete for attention with the original performance bugs. :)
Comment 7 PK 2017-11-12 11:10:25 UTC
I do not agree with Nate in comment 6. 
My problem: how do you get baloo to index a folder on an external partition? Add the whole partition? That could turn out to be very expensive, blacklist all other folders on that partition? That could be really not practical.
If I would whitelist a folder I would assume I did that recursively and that baloo would follow the changes in that folder automatically.
Comment 8 Nate Graham 2017-11-12 14:25:11 UTC
A whitelist may be a useful *additional* feature, which would let you index parts of external drives thata re not indexed vy default. But I don't think we can use it exclusively, because of the issues I raised in comment #6. GNOME's Tracker uses a whitelist approach just like you're asking for, and indeed it winds up being very confusing for a lot of people, who wind up with a lot of their content un-indexed until they delve into the technical details of how Tracker is implemented.

If you want a whitelist feature *in addition* to the current approach, please feel free to file a new request for that.