The search by age in kmail does not and cannot work in it's current implementation. In kdepim/mailcommon/searchpattern.cpp, the comparison is presently made with a QDate instead of a QDateTime. This makes the search not work at all. Moreover, the age value is not subtracted from the present date but added. I have a patch correcting these issues but then the comparison is inverted, an issue I do not know how to correct. For example, searching for mail with an age "lower or equal" than "3 days" produces the following query (today is 2012-10-13): select distinct ?r ?reqProp1 where { { ?r <http://akonadi-project.org/ontologies/aneo#akonadiItemId> ?reqProp1 . ?r <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate> ?v1 . FILTER(?v1<="2012-10-10T23:00:00Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>) . ?r a <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email> . FILTER EXISTS { ?r a [ <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#userVisible> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ] . } . } . } Reproducible: Always
I can confirm that the filter for "Age in Days" does not work with KDE-4.10 RC3
it's right it doesn't work.
I disabled date search in 4.12 because nepomuk doesn't have date support it has datetime support but not date only support. Wait that nepomuk will improve
In 4.14 one can still search by "age in days" but the result is plainly wrong.
Hello Luis. Thank you for your report. Laurent, is it possible to have search by age with with Baloo/Akonadi Search? Thanks, Martin
What luisfe said in Comment 4, but for 5.4.1. If the search backend (baloo, as it is now) does not support searching by age, the option should be removed from the search dialog. I searched for messages younger than 3 days, and the search came up with every email I ever received, including very old ones and those from today or yesterday.