After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671470 - Mail search on body doesn't work (local mail)
Mail search on body doesn't work (local mail)
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.2.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[maildir]
Depends on:
Blocks:
 
 
Reported: 2012-03-06 13:48 UTC by Frederic Crozat
Modified: 2020-02-21 00:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds patch + workaround (2.95 KB, patch)
2012-03-07 10:06 UTC, Milan Crha
committed Details | Review

Description Frederic Crozat 2012-03-06 13:48:12 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..
Comment 1 Milan Crha 2012-03-06 19:18:06 UTC
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.
Comment 2 Milan Crha 2012-03-07 10:06:32 UTC
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.
Comment 3 Milan Crha 2012-03-07 10:12:02 UTC
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
Comment 4 Frederic Crozat 2012-03-07 17:48:26 UTC
The various messages are distributed in all folders under This Computer using a filter which move messages from IMAP account to local storage.
Comment 5 Milan Crha 2012-03-08 09:21:42 UTC
Thanks for the update. That way it should work, the index should be updated, but it isn't. So we have c).
Comment 6 Frederic Crozat 2013-03-05 16:46:50 UTC
Looks like it got fixed in eds / evolution 3.6.x :)

I suggest to close it.
Comment 7 Milan Crha 2013-03-06 15:07:14 UTC
Nice, thanks for the follow-up.
Comment 8 br0x 2019-02-27 02:12:29 UTC
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

?
Comment 9 Milan Crha 2019-02-27 11:06:53 UTC
> 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.
Comment 10 Frederic Crozat 2019-02-27 11:41:16 UTC
As far as the initial bug report, it works fine on my latest evolution installation.
Comment 11 Ángel 2020-02-21 00:17:19 UTC
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).