diff options
| author | Todd <todd@electricoding.com> | 2015-01-22 17:43:38 -0600 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-01-24 16:47:59 +0100 |
| commit | b04bc967f9837e9d451ef88c276c744aa55accaa (patch) | |
| tree | c75cfd2569930441556d89bf2bd9c2b4c801c003 /lib/database.cc | |
| parent | 0de999aab5bd4cd44bc4ea76fd1d25172bd839ae (diff) | |
Add indexing for the mimetype term
This adds the indexing support for the "mimetype:" term and removes
the broken test flag. The indexing is probablistic in Xapian terms,
which gives a better experience to end users. Standard content-types
of the form "foo/bar" are automatically interpreted as phrases in
Xapian due to the embedded slash.
Assume, separate messages with application/pdf and application/x-pdf
are indexed, then:
- mimetype:application/x-pdf will find only the application/x-pdf
- mimetype:application/pdf will find only the application/pdf
- mimetype:pdf will find both of the messages
Diffstat (limited to 'lib/database.cc')
| -rw-r--r-- | lib/database.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/database.cc b/lib/database.cc index 0d2c4172..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"}, }; |
