aboutsummaryrefslogtreecommitdiff
path: root/lib/database-private.h
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2023-01-05 20:02:05 -0400
committerDavid Bremner <david@tethera.net>2023-04-02 19:22:36 -0300
commit3f5809bf28becbddfed9ff33d6f1242346904c23 (patch)
tree9ad7cad85d6dc1a0d7e6796e22032cefcd72b121 /lib/database-private.h
parentc6733a45c8ff698505ff330d2edce92c90cbc946 (diff)
lib: parse index.as_text
We pre-parse into a list of compiled regular expressions to avoid calling regexc on the hot (indexing) path. As explained in the code comment, this cannot be done lazily with reasonable error reporting, at least not without touching a lot of the code in index.cc.
Diffstat (limited to 'lib/database-private.h')
-rw-r--r--lib/database-private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/database-private.h b/lib/database-private.h
index b9be4e22..61232f1a 100644
--- a/lib/database-private.h
+++ b/lib/database-private.h
@@ -291,6 +291,10 @@ struct _notmuch_database {
/* Track what parameters were specified when opening */
notmuch_open_param_t params;
+
+ /* list of regular expressions to check for text indexing */
+ regex_t *index_as_text;
+ size_t index_as_text_length;
};
/* Prior to database version 3, features were implied by the database