X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fdatabase.cc;h=3974e2ed3a35c1278443095d452dbd1243b7fef2;hp=3601f9ded30778620e18a5835de00e6e00ef7854;hb=08757767de5c148cea8e7b97274789f851fbd854;hpb=70f15b37fb226160acea591632b73ebe1e48809c diff --git a/lib/database.cc b/lib/database.cc index 3601f9de..3974e2ed 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -254,6 +254,7 @@ static prefix_t PROBABILISTIC_PREFIX[]= { { "from", "XFROM" }, { "to", "XTO" }, { "attachment", "XATTACHMENT" }, + { "mimetype", "XMIMETYPE"}, { "subject", "XSUBJECT"}, }; @@ -304,6 +305,11 @@ static const struct { "exact folder:/path: search", "rw" }, { NOTMUCH_FEATURE_GHOSTS, "mail documents for missing messages", "w"}, + /* Knowledge of the index mime-types are not required for reading + * a database because a reader will just be unable to query + * them. */ + { NOTMUCH_FEATURE_INDEXED_MIMETYPES, + "indexed MIME types", "w"}, }; const char * @@ -646,9 +652,10 @@ notmuch_database_create (const char *path, notmuch_database_t **database) if (status) goto DONE; - /* Upgrade doesn't add this feature to existing databases, but new - * databases have it. */ + /* Upgrade doesn't add these feature to existing databases, but + * new databases have them. */ notmuch->features |= NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES; + notmuch->features |= NOTMUCH_FEATURE_INDEXED_MIMETYPES; status = notmuch_database_upgrade (notmuch, NULL, NULL); if (status) {