recollindex -i or -e: do not process the web queue
This commit is contained in:
parent
d9fba74dbe
commit
7c9b13d64e
@ -178,7 +178,7 @@ bool ConfIndexer::indexFiles(list<string>& ifiles, IxFlag flag)
|
|||||||
LOGDEB2(("ConfIndexer::indexFiles: fsindexer returned %d, "
|
LOGDEB2(("ConfIndexer::indexFiles: fsindexer returned %d, "
|
||||||
"%d files remainining\n", ret, myfiles.size()));
|
"%d files remainining\n", ret, myfiles.size()));
|
||||||
|
|
||||||
if (m_dobeagle && !myfiles.empty()) {
|
if (m_dobeagle && !myfiles.empty() && !(flag & IxFNoWeb)) {
|
||||||
if (!m_beagler)
|
if (!m_beagler)
|
||||||
m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater);
|
m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater);
|
||||||
if (m_beagler) {
|
if (m_beagler) {
|
||||||
@ -237,7 +237,7 @@ bool ConfIndexer::updateDocs(std::vector<Rcl::Doc> &docs, IxFlag flag)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfIndexer::purgeFiles(std::list<string> &files)
|
bool ConfIndexer::purgeFiles(std::list<string> &files, IxFlag flag)
|
||||||
{
|
{
|
||||||
list<string> myfiles;
|
list<string> myfiles;
|
||||||
string origcwd = m_config->getOrigCwd();
|
string origcwd = m_config->getOrigCwd();
|
||||||
@ -259,7 +259,7 @@ bool ConfIndexer::purgeFiles(std::list<string> &files)
|
|||||||
if (m_fsindexer)
|
if (m_fsindexer)
|
||||||
ret = m_fsindexer->purgeFiles(myfiles);
|
ret = m_fsindexer->purgeFiles(myfiles);
|
||||||
|
|
||||||
if (m_dobeagle && !myfiles.empty()) {
|
if (m_dobeagle && !myfiles.empty() && !(flag & IxFNoWeb)) {
|
||||||
if (!m_beagler)
|
if (!m_beagler)
|
||||||
m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater);
|
m_beagler = new BeagleQueueIndexer(m_config, &m_db, m_updater);
|
||||||
if (m_beagler) {
|
if (m_beagler) {
|
||||||
|
|||||||
@ -99,7 +99,10 @@ class ConfIndexer {
|
|||||||
enum ixType {IxTNone, IxTFs=1, IxTBeagleQueue=2,
|
enum ixType {IxTNone, IxTFs=1, IxTBeagleQueue=2,
|
||||||
IxTAll = IxTFs | IxTBeagleQueue};
|
IxTAll = IxTFs | IxTBeagleQueue};
|
||||||
// Misc indexing flags
|
// 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 */
|
/** Run indexers */
|
||||||
bool index(bool resetbefore, ixType typestorun);
|
bool index(bool resetbefore, ixType typestorun);
|
||||||
@ -126,7 +129,7 @@ class ConfIndexer {
|
|||||||
bool updateDocs(vector<Rcl::Doc> &docs, IxFlag f = IxFNone);
|
bool updateDocs(vector<Rcl::Doc> &docs, IxFlag f = IxFNone);
|
||||||
static bool docsToPaths(vector<Rcl::Doc> &docs, vector<string> &paths);
|
static bool docsToPaths(vector<Rcl::Doc> &docs, vector<string> &paths);
|
||||||
/** Purge a list of files. */
|
/** Purge a list of files. */
|
||||||
bool purgeFiles(list<string> &files);
|
bool purgeFiles(list<string> &files, IxFlag f = IxFNone);
|
||||||
|
|
||||||
/** Set in place reset mode */
|
/** Set in place reset mode */
|
||||||
void setInPlaceReset() {m_db.setInPlaceReset();}
|
void setInPlaceReset() {m_db.setInPlaceReset();}
|
||||||
|
|||||||
@ -209,6 +209,8 @@ bool recursive_index(RclConfig *config, const string& top)
|
|||||||
// this case we're called repeatedly in the same process, and the
|
// this case we're called repeatedly in the same process, and the
|
||||||
// confindexer is only created once by makeIndexerOrExit (but the db closed and
|
// confindexer is only created once by makeIndexerOrExit (but the db closed and
|
||||||
// flushed every time)
|
// 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<string> &filenames)
|
bool indexfiles(RclConfig *config, list<string> &filenames)
|
||||||
{
|
{
|
||||||
if (filenames.empty())
|
if (filenames.empty())
|
||||||
@ -216,7 +218,7 @@ bool indexfiles(RclConfig *config, list<string> &filenames)
|
|||||||
makeIndexerOrExit(config, (op_flags & OPT_Z) != 0);
|
makeIndexerOrExit(config, (op_flags & OPT_Z) != 0);
|
||||||
return confindexer->indexFiles(filenames, (op_flags&OPT_f) ?
|
return confindexer->indexFiles(filenames, (op_flags&OPT_f) ?
|
||||||
ConfIndexer::IxFIgnoreSkip :
|
ConfIndexer::IxFIgnoreSkip :
|
||||||
ConfIndexer::IxFNone);
|
ConfIndexer::IxFNoWeb);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete a list of files. Same comments about call contexts as indexfiles.
|
// Delete a list of files. Same comments about call contexts as indexfiles.
|
||||||
@ -225,7 +227,7 @@ bool purgefiles(RclConfig *config, list<string> &filenames)
|
|||||||
if (filenames.empty())
|
if (filenames.empty())
|
||||||
return true;
|
return true;
|
||||||
makeIndexerOrExit(config, (op_flags & OPT_Z) != 0);
|
makeIndexerOrExit(config, (op_flags & OPT_Z) != 0);
|
||||||
return confindexer->purgeFiles(filenames);
|
return confindexer->purgeFiles(filenames, ConfIndexer::IxFNoWeb);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create stemming and spelling databases
|
// Create stemming and spelling databases
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user