fulltext: be smarter about exiting silently if there's nothing to do.
authorArt Cancro <ajc@citadel.org>
Fri, 1 Sep 2023 15:55:20 +0000 (15:55 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 1 Sep 2023 15:55:20 +0000 (15:55 +0000)
citadel/server/modules/fulltext/serv_fulltext.c

index ea374542e4ac3150a8574845e0fefc3d82f2b0c8..3a1129f2e300eac31658c0e0629cbcdc766088e4 100644 (file)
@@ -195,8 +195,6 @@ void do_fulltext_indexing(void) {
        if (!CtdlGetConfigInt("c_enable_fulltext")) {
                return;
        }
-       syslog(LOG_DEBUG, "fulltext: indexing started");
-
        // If we've switched wordbreaker modules, burn the index and start over.
        begin_critical_section(S_CONTROL);
        if (CtdlGetConfigInt("MM_fulltext_wordbreaker") != FT_WORDBREAKER_ID) {
@@ -216,6 +214,8 @@ void do_fulltext_indexing(void) {
 
        highest_msg_already_indexed = CtdlGetConfigLong("MMfulltext");
        highest_msg_to_be_indexed = CtdlGetConfigLong("MMhighest");
+       syslog(LOG_DEBUG, "fulltext: indexing started. msgs %ld--%ld", highest_msg_already_indexed, highest_msg_to_be_indexed);
+
        messages_to_be_indexed = array_new(sizeof(long));
 
        // Now go through each room and find messages to index.