mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
Trim down prefix list to things we are actually using.
I've decided not to try for sup compatibility at the leve of the xapian datbase. There's just too much about sup's usage of the database that I don't like, (beyond the embedded ruby data structures there is redundant storage of message IDs, thread IDs, and dates (in both terms and values)). I'm going to fix that up in the database of notmuch, with some other changes as well. (I plan to drop "reference" terms once linkage to a thread ID through the reference is established. I also plan to add actual documents to represent threads.) So with all that incompatibility, I might as well make my own prefix values. And while doing that, I should try to be as compatible as possible with the conventions described here: http://xapian.org/docs/omega/termprefixes.html
This commit is contained in:
parent
e37b7cc2da
commit
f281f4b677
1 changed files with 0 additions and 20 deletions
20
database.cc
20
database.cc
|
@ -41,25 +41,9 @@ typedef struct {
|
|||
const char *prefix;
|
||||
} prefix_t;
|
||||
|
||||
prefix_t NORMAL_PREFIX[] = {
|
||||
{ "subject", "S" },
|
||||
{ "body", "B" },
|
||||
{ "from_name", "FN" },
|
||||
{ "to_name", "TN" },
|
||||
{ "name", "N" },
|
||||
{ "attachment", "A" }
|
||||
};
|
||||
|
||||
prefix_t BOOLEAN_PREFIX[] = {
|
||||
{ "type", "K" },
|
||||
{ "from_email", "FE" },
|
||||
{ "to_email", "TE" },
|
||||
{ "email", "E" },
|
||||
{ "date", "D" },
|
||||
{ "label", "L" },
|
||||
{ "tag", "L" },
|
||||
{ "source_id", "I" },
|
||||
{ "attachment_extension", "O" },
|
||||
{ "msgid", "Q" },
|
||||
{ "thread", "H" },
|
||||
{ "ref", "R" },
|
||||
|
@ -71,10 +55,6 @@ _find_prefix (const char *name)
|
|||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE (NORMAL_PREFIX); i++)
|
||||
if (strcmp (name, NORMAL_PREFIX[i].name) == 0)
|
||||
return NORMAL_PREFIX[i].prefix;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX); i++)
|
||||
if (strcmp (name, BOOLEAN_PREFIX[i].name) == 0)
|
||||
return BOOLEAN_PREFIX[i].prefix;
|
||||
|
|
Loading…
Reference in a new issue