GNOME Bugzilla – Bug 335438
Beagle doesn't update when emails moved to new folder in Evolution
Last modified: 2018-07-03 09:52:01 UTC
Please describe the problem: If an email is moved to the Trash or to another folder in Evolution, the corresponding entry for that email in Beagle's records isn't updated. So when you search for a term in that email it shows up, but when you open the email it comes up as blank because the email is no longer where Beagle thinks it is. Steps to reproduce: 1. Identify an email in your inbox, note a term used in that email, delete it or move it to another folder 2. Enter the search term identified in (1) into the Beagle desktop search window. 3. Open the email when it shows up in the Beagle search results Actual results: An Evolution email window opens up with no content and all the icons greyed out. Expected results: The original email opens up, having been tracked by Beagle between the different Evo folders. Does this happen every time? Yes. Other information: Running Evolution 2.4, Beagle version 0.2.2, on a Debian Etch/Sid system.
Is the trash folder a real folder or some kind of virtual folder?
I think Trash must be a virtual folder - it's not listed in ~/.evolution/mail/local. But even moving a message straight to a real folder without going via Trash seems not to be picked up. I think a workaround could be to set up a cron job that erases the Evolution-related folders from ~/.beagle on a daily basis, forcing a reindex, but that's a bit of an ugly way of doing it.
Created attachment 61953 [details] Beagle log file I followed your suggestion from the dashboard-hackers list (restarting the daemon with --allow-backend evolutionmail) and then moved one email (containing the keyword "chemnitz") from the Inbox into a subfolder (Archives/2006) and one email (containing the keyword "melanchthon") into Trash by deleting it. The log file is attached, but looking at it one observation I have regards the following three lines: 060324 2353073240 13172 Beagle DEBUG: Daemon initialization finished after .80s 060324 2353241102 13172 Beagle DEBUG: Parsed query 'chemnitz' as text_query 060324 2353336828 13172 Beagle DEBUG: Parsed query 'melanchthon' as text_query I did my moving/deleting of files between the first line and the second line, so it appears that those actions were not picked up by the daemon. Another point: following the later lines in the log file once it started re-checking the Evo folders, I noted the following behaviours: 1. The email I deleted and which is now in the trash ("melanchthon") still shows up in the Beagle search but when opened is blank. 2. The email I dragged into the Archives/2006 folder ("chemnitz") now appears *twice* in the search results - once as the Archives/2006 item, which opens correctly, and once as the Inbox item, which opens as a blank message. This suggests to me that the problem may lie in how Beagle records (or fails to record) items being removed from the Inbox, whether by deleting or moving. Finally, I note that both these emails are still in the ~/.evolution/mail/local/Inbox file, even though they don't appear in the actual Inbox in Evo. I assume this is the root of the problem - Beagle is indexing them from that file, and isn't taking into account whatever way it is that Evo tracks these items in Evo's internal database. The moved email appears twice because it is in both ~/.evolution/mail/local/Inbox and the ~/.evolution/mail/local/Archives.sbd/2006 file, while the deleted email appears only once because it is only in the ~/.evolution/mail/local/Inbox file.
Created attachment 61955 [details] IndexHelper log file Here's the other log file from the same session as the previous attachment, in case it helps.
I see the same behavior, with the difference that I use remote IMAP folders only, so their visibility or not in a local file should make no difference. But I guess Beagle is reading the mails via libcamel and not by scanning local files anyway.. My diagnosis is also that Beagle fails to pick up a deletion event, so mails that are moved or deleted are not removed from its index.
Beagle is not under active development anymore and had its last code changes in early 2011. Its codebase has been archived (see bug 796735): https://gitlab.gnome.org/Archive/beagle/commits/master "tracker" is an available alternative. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.