]> git.notmuchmail.org Git - notmuch/commitdiff
Don't create "contact" terms in the database.
authorCarl Worth <cworth@cworth.org>
Thu, 12 Nov 2009 17:38:24 +0000 (09:38 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 12 Nov 2009 17:38:24 +0000 (09:38 -0800)
We never did export any interface to get at these, and when I went to
use these, I found them inadequate, (because I wanted to distinguish
address found in from: from those found in To:). Meanwhile, it was
easy enough to extract addresses with a search like:

notmuch show tag:sent | grep ^To:

so the storage of contact terms was just wasting space. Stop that.

lib/database.cc
lib/index.cc

index 6b7ad49d7eb1fc369d8afaaf66f6896407fa9dd5..4e49e53f9c883a1d14ca0daa9e27e022f582d7b1 100644 (file)
@@ -107,7 +107,6 @@ prefix_t BOOLEAN_PREFIX_INTERNAL[] = {
     { "ref", "XREFERENCE" },
     { "replyto", "XREPLYTO" },
     { "timestamp", "XTIMESTAMP" },
     { "ref", "XREFERENCE" },
     { "replyto", "XREPLYTO" },
     { "timestamp", "XTIMESTAMP" },
-    { "contact", "XCONTACT" }
 };
 
 prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
 };
 
 prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
index 747a4e63334c1aa3c5602134f39ecfb1ab8d3978..65b83b3f706f4fc3df571cd2caefc86c1d25ec10 100644 (file)
@@ -31,23 +31,11 @@ _index_address_mailbox (notmuch_message_t *message,
 {
     InternetAddressMailbox *mailbox = INTERNET_ADDRESS_MAILBOX (address);
     const char *name, *addr;
 {
     InternetAddressMailbox *mailbox = INTERNET_ADDRESS_MAILBOX (address);
     const char *name, *addr;
-    char *contact;
     int own_name = 0;
 
     name = internet_address_get_name (address);
     addr = internet_address_mailbox_get_addr (mailbox);
 
     int own_name = 0;
 
     name = internet_address_get_name (address);
     addr = internet_address_mailbox_get_addr (mailbox);
 
-    if (addr) {
-       if (name) {
-           contact = talloc_asprintf (message, "\"%s\" <%s>",
-                                      name, addr);
-           _notmuch_message_add_term (message, "contact", contact);
-           talloc_free (contact);
-       } else {
-           _notmuch_message_add_term (message, "contact", addr);
-       }
-    }
-
     /* In the absence of a name, we'll strip the part before the @
      * from the address. */
     if (! name) {
     /* In the absence of a name, we'll strip the part before the @
      * from the address. */
     if (! name) {