]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/fulltext/serv_fulltext.c
tuning the index cache
[citadel.git] / citadel / modules / fulltext / serv_fulltext.c
index 522c3824a7d08269dfc98fb199ea09c611a5c191..4fced5e28ac95b2a7eaebf00ec992b8e524605a8 100644 (file)
@@ -245,7 +245,7 @@ void do_fulltext_indexing(void) {
        static int is_running = 0;
        if (is_running) return;         /* Concurrency check - only one can run */
        is_running = 1;
-       
+
        /*
         * Don't do this if the site doesn't have it enabled.
         */
@@ -256,14 +256,19 @@ void do_fulltext_indexing(void) {
        /*
         * Make sure we don't run the indexer too frequently.
         * FIXME move the setting into config
-        */
-       if ( (time(NULL) - last_index) < 300L) {
+       time_t now = time(NULL);
+       if ( (now - last_index) < 300L) {
+               syslog(LOG_DEBUG,
+                       "fulltext: indexing interval not yet reached; last run was %ldm%lds ago",
+                       ((now - last_index) / 60),
+                       ((now - last_index) % 60)
+               );
                return;
        }
+        */
 
        /*
-        * Check to see whether the fulltext index is up to date; if there
-        * are no messages to index, don't waste any more time trying.
+        * Silently return if our fulltext index is up to date with new messages.
         */
        if (
                (CtdlGetConfigLong("MMfulltext") >= CtdlGetConfigLong("MMhighest"))