From 0c18a0b816dc2eaa4bf8c282c1120662266f7364 Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 22 Mar 2014 18:51:39 +0200 Subject: [PATCH] * mu: store date as 0 if it does not exist; this allows searching --- lib/mu-store-write.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/mu-store-write.cc b/lib/mu-store-write.cc index 12de8afa..7be50654 100644 --- a/lib/mu-store-write.cc +++ b/lib/mu-store-write.cc @@ -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