[RFC patch 5/5] WIP: index user headers

2018-11-17 Thread David Bremner
--- lib/database.cc | 37 + lib/index.cc | 34 ++ lib/message.cc | 5 - lib/notmuch-private.h| 4 test/T720-user-header.sh | 17 + 5 files changed, 88 insertions(+), 9

[RFC patch 1/5] cli/config: refactor _stored_in_db

2018-11-17 Thread David Bremner
This will make it easier to add other prefixes that are stored in the database, compared to special casing each one as "query." was. --- notmuch-config.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index

[RFC patch 2/5] cli/config: support user header index config

2018-11-17 Thread David Bremner
We don't do anything with this configuration information information yet, but nonetheless add a couple of regression tests to make sure we don't break standard functionality when we do use the configuration information. --- notmuch-config.c | 1 + test/T720-user-header.sh | 38

Draft of indexing user defined headers

2018-11-17 Thread David Bremner
This is an early draft, it definitely needs polishing. Feedback on the general design welcome. Notice that users will need to reindex manually after changing the set of indexed headers. ___ notmuch mailing list notmuch@notmuchmail.org

[RFC patch 3/5] lib: setup user headers in query parser

2018-11-17 Thread David Bremner
These tests will need to be updated if the Xapian query print/debug format changes. --- lib/database.cc | 40 test/T720-user-header.sh | 21 + 2 files changed, 61 insertions(+) diff --git a/lib/database.cc b/lib/database.cc

[RFC patch 4/5] WIP: store user prefixes

2018-11-17 Thread David Bremner
Maybe this should be unified into one prefix table? --- lib/database-private.h | 8 lib/database.cc| 32 +++- lib/notmuch-private.h | 4 lib/thread.cc | 2 -- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git