diff --git a/src/index/indexer.cpp b/src/index/indexer.cpp index 7e93fc3c..b12cff7d 100644 --- a/src/index/indexer.cpp +++ b/src/index/indexer.cpp @@ -178,7 +178,7 @@ bool ConfIndexer::indexFiles(list& ifiles, IxFlag flag) LOGDEB2(("ConfIndexer::indexFiles: fsindexer returned %d, " "%d files remainining\n", ret, myfiles.size())); - if (m_dobeagle && !myfiles.empty()) { + if (m_dobeagle && !myfiles.empty() && !(flag & IxFNoWeb)) { if (!m_beagler) m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater); if (m_beagler) { @@ -237,7 +237,7 @@ bool ConfIndexer::updateDocs(std::vector &docs, IxFlag flag) return true; } -bool ConfIndexer::purgeFiles(std::list &files) +bool ConfIndexer::purgeFiles(std::list &files, IxFlag flag) { list myfiles; string origcwd = m_config->getOrigCwd(); @@ -259,7 +259,7 @@ bool ConfIndexer::purgeFiles(std::list &files) if (m_fsindexer) ret = m_fsindexer->purgeFiles(myfiles); - if (m_dobeagle && !myfiles.empty()) { + if (m_dobeagle && !myfiles.empty() && !(flag & IxFNoWeb)) { if (!m_beagler) m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater); if (m_beagler) { diff --git a/src/index/indexer.h b/src/index/indexer.h index 350fa1c9..f2c9bd16 100644 --- a/src/index/indexer.h +++ b/src/index/indexer.h @@ -99,7 +99,10 @@ class ConfIndexer { enum ixType {IxTNone, IxTFs=1, IxTBeagleQueue=2, IxTAll = IxTFs | IxTBeagleQueue}; // Misc indexing flags - enum IxFlag {IxFNone = 0, IxFIgnoreSkip = 1}; + enum IxFlag {IxFNone = 0, + IxFIgnoreSkip = 1, // Ignore skipped lists + IxFNoWeb = 2, // Do not process the web queue. + }; /** Run indexers */ bool index(bool resetbefore, ixType typestorun); @@ -126,7 +129,7 @@ class ConfIndexer { bool updateDocs(vector &docs, IxFlag f = IxFNone); static bool docsToPaths(vector &docs, vector &paths); /** Purge a list of files. */ - bool purgeFiles(list &files); + bool purgeFiles(list &files, IxFlag f = IxFNone); /** Set in place reset mode */ void setInPlaceReset() {m_db.setInPlaceReset();} diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index ec421771..620b74c0 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -209,6 +209,8 @@ bool recursive_index(RclConfig *config, const string& top) // this case we're called repeatedly in the same process, and the // confindexer is only created once by makeIndexerOrExit (but the db closed and // flushed every time) +// We set the noweb flag (the web queue is processed by default when +// confindexer::indexFiles is called from the realtime monitor) bool indexfiles(RclConfig *config, list &filenames) { if (filenames.empty()) @@ -216,7 +218,7 @@ bool indexfiles(RclConfig *config, list &filenames) makeIndexerOrExit(config, (op_flags & OPT_Z) != 0); return confindexer->indexFiles(filenames, (op_flags&OPT_f) ? ConfIndexer::IxFIgnoreSkip : - ConfIndexer::IxFNone); + ConfIndexer::IxFNoWeb); } // Delete a list of files. Same comments about call contexts as indexfiles. @@ -225,7 +227,7 @@ bool purgefiles(RclConfig *config, list &filenames) if (filenames.empty()) return true; makeIndexerOrExit(config, (op_flags & OPT_Z) != 0); - return confindexer->purgeFiles(filenames); + return confindexer->purgeFiles(filenames, ConfIndexer::IxFNoWeb); } // Create stemming and spelling databases