* Full text indexer is now switchable on/off
[citadel.git] / citadel / imap_search.c
index c43e966fbf8a396606bf87dc74c49b00c9ef1fd2..a179a759e283e4e92fbed70b4446f95502224734 100644 (file)
@@ -449,9 +449,9 @@ void imap_do_search(int num_items, char **itemlist, int is_uid) {
 
        /* If there is a BODY search criterion in the query, use our full
         * text index to disqualify messages that don't have any chance of
-        * matching.
+        * matching.  (Only do this if the index is enabled!!)
         */
-       for (i=0; i<(num_items-1); ++i) {
+        if (config.c_enable_fulltext) for (i=0; i<(num_items-1); ++i) {
                if (!strcasecmp(itemlist[i], "BODY")) {
                        ft_search(&fts_num_msgs, &fts_msgs, itemlist[i+1]);
                        if (fts_num_msgs > 0) {