Bug 453278 - Baloo doesn't reindex files after they have been moved or renamed - manually reindexing is necessary...
Summary: Baloo doesn't reindex files after they have been moved or renamed - manually ...
Status: RESOLVED DUPLICATE of bug 392793
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-02 00:45 UTC by piedro
Modified: 2022-05-02 14:54 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description piedro 2022-05-02 00:45:42 UTC
SUMMARY

on my system baloo only searches the documents and music folder. Tagging, content and file name search works initially. But when I work with the files - renaming them, moving some in subfolders  or renaming the containing folder they disappear from the index.   



STEPS TO REPRODUCE
1. index a file in a subfolder in Documents ("recent_path", "recent_file_name")
2. rename the subfolder or the file or both ("current_path", "current_file_name")
3. search for the content or the file name of the current file in the current folder  

OBSERVED RESULT
Absurd: the search can't find the file name nor the content of the file in the current folder - though it is right there in the dolphin window if you do not search for it (navigate > current folder > content: this one current file!)  

EXPECTED RESULT
To find the only file in the current folder by it's name within the current folder... 

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Arch linux 5.17.5-arch1-1, fully updated 
KDE Plasma Version: 5.24.4   
KDE Frameworks Version: 5.93.0  
Qt Version: 5.15.3

ADDITIONAL INFORMATION

the current file's index can be shown with 

"balooshow -x /current_path/current_file_name" 

but the file index information output still contains the old file path "/recent_path/recent_file_name"! 

So my guess is that after renaming a file the index isn't updated - baloo sleeps on the job. It doesn't matter to wait a while or reboot - only reindexing does the job to update the files index information to include the correct path and file name. 

On a curious note: Is it normal that some tags are shown as "TAG-tagname1" and others  as "TAtagname2" or is this a hint that something with the indexing isn't right anyway?
Comment 1 piedro 2022-05-02 01:03:12 UTC
After changing a folder name or moving a folder "balooctl status" stays idle - shouldn'T it start working right away?
Comment 2 piedro 2022-05-02 01:52:49 UTC
Baloo stops working after initial indexing - this also doesn't index new files added later.
Comment 3 tagwerk19 2022-05-02 05:42:06 UTC
Does Bug 392793 describe this? (and https://bugs.kde.org/show_bug.cgi?id=392793#c3?)

I think I still run into the issue if renaming a parent folder (or sometimes have trouble, not every time) and if I've renamed the parent folder, anything I then do in it is not picked up. I don't think the patches discussed in 392793 caught all the instances and didn't make it into production.

A "balooctl check" works to get baloo back "up to date" (in the case of renames)

B.T.W. I think you see the difference between TAG- and TA prefixes if you have a multi-word or hierarchical tag, cf tagging with "Parent/Child"
Comment 4 piedro 2022-05-02 11:04:03 UTC
Thanks... Yes-  this other bug looks like the reason for this bug. 

If you don't mind - could you mark it as duplicate? 

Though I do not understand the resolve - does the fix suggested work or not? 
Do I as a user have to do something with inotify? 

You're TAG comment is interesting - I  didn't know there is such a thing as hierarchical tags - is there any help or documentaion on that topic - I'd really be interested in what exactly I can do with tags (and what I shouldn't even try) :-) ?
Comment 5 tagwerk19 2022-05-02 14:54:17 UTC
(In reply to piedro from comment #4)
> If you don't mind - could you mark it as duplicate? 
Will do...

> Though I do not understand the resolve - does the fix suggested work or not? 
For the issue I'd been looking at (renaming the parent folder), no...

> Do I as a user have to do something with inotify?
I think not, even though the symptoms "feel like" baloo missing the iNotify msg(s). However I have met issues when deleting "large numbers" of files when you can hit iNotify limits (https://bugs.kde.org/show_bug.cgi?id=437754#c1)

> You're TAG comment is interesting - I  didn't know there is such a thing as
> hierarchical tags - is there any help or documentaion on that topic - I'd
> really be interested in what exactly I can do with tags (and what I
> shouldn't even try) :-) ?
Tags are Magic and hierarchical tags are Utter Magic :-)

You are right though, there are traps for the unwary. Watch out for Bug 431053 and Bug 431093. Feel free to ask if you stumble on anything that does not seem to "do as it should"

*** This bug has been marked as a duplicate of bug 392793 ***