GNOME Bugzilla – Bug 671470
Mail search on body doesn't work (local mail)
Last modified: 2020-02-21 00:17:19 UTC
When searching on local mail (On This computer hierarchy) in mail body, evolution doesn't find any match (despite grep -r finding the relevant match on the mail folder on disk). I tried to remove the indexes on disk and restart evolution, no success. It used to work, so there is a regression somewhere..
Just wondering, how are you messages distributed around folders under On This Computer? I realized that messages which are added to folder through camel_folder_transfer_messages_to, where both folders are maildir folders, are not added into the index, same as deleting the index doesn't mean that the already stored messages are indexed again. The reindex works only if the folder/db file (or the corresponding table for the folder) is also gone (I guess). Our main problem is with transfer of the messages, where is no body indexing involved. I have a patch which has indexed words, but it is missing message uids for some reason, which I do not understand. (I've not much idea how the actual indexing works.) By the way, the option to index or not index message bodies on folders doesn't mean anything, the code behaves like the option is always on, search counts with indexes, as far as I can tell.
Created attachment 209140 [details] [review] eds patch + workaround for evolution-data-server; This makes the "Index message body data" option work as expected, aka if it's disabled, then there is not provided any body index to the search. This results in slower local searching, but accurate results. The workaround part of this patch is the chunk in camel_maildir_folder_new(), where I always disable body indexing, regardless user preference. It'll be there till the body indexing for maildir folders will be revisited.
Created commit 13aed50 in eds master (3.3.92+) I left the bug opened, to address the non-working body indexing. Currently known issues (maybe there are more): a) messages which are moved between folders within maildir_folder_transfer_messages_to_sync() are not properly indexed b) deleted index files are not fully populated with messages in the folder, like it used to work with mbox folders
The various messages are distributed in all folders under This Computer using a filter which move messages from IMAP account to local storage.
Thanks for the update. That way it should work, the index should be updated, but it isn't. So we have c).
Looks like it got fixed in eds / evolution 3.6.x :) I suggest to close it.
Nice, thanks for the follow-up.
Hi guys, Was the indexing problem actually fixed? If yes, shouldn't we delete the line: https://gitlab.gnome.org/GNOME/evolution-data-server/blob/gnome-3-30/src/camel/providers/local/camel-maildir-folder.c#L505 ?
> Was the indexing problem actually fixed? I do not think it had been fixed. Nobody tested it, also due to the line in the code you referenced.
As far as the initial bug report, it works fine on my latest evolution installation.
The test case was fixed by the patch in comment 2, Frederic. By disabling the use of the index, the searches do work. It's not using the index, though (so it's slower).