* mu: store date as 0 if it does not exist; this allows searching

This commit is contained in:
djcb 2014-03-22 18:51:39 +02:00
parent 77accde8b0
commit 0c18a0b816
1 changed files with 3 additions and 4 deletions

View File

@ -207,10 +207,9 @@ add_terms_values_date (Xapian::Document& doc, MuMsg *msg, MuMsgFieldId mfid)
const char *datestr;
t = (time_t)mu_msg_get_field_numeric (msg, mfid);
if (t != 0) {
datestr = mu_date_time_t_to_str_s (t, FALSE /*UTC*/);
doc.add_value ((Xapian::valueno)mfid, datestr);
}
datestr = mu_date_time_t_to_str_s (t, FALSE /*UTC*/);
doc.add_value ((Xapian::valueno)mfid, datestr);
}
G_GNUC_CONST