|
a/src/index/fsindexer.cpp |
|
b/src/index/fsindexer.cpp |
|
... |
|
... |
532 |
{
|
532 |
{
|
533 |
recoll_threadinit();
|
533 |
recoll_threadinit();
|
534 |
FsIndexer *fip = (FsIndexer*)fsp;
|
534 |
FsIndexer *fip = (FsIndexer*)fsp;
|
535 |
WorkQueue<InternfileTask*> *tqp = &fip->m_iwqueue;
|
535 |
WorkQueue<InternfileTask*> *tqp = &fip->m_iwqueue;
|
536 |
DebugLog::getdbl()->setloglevel(fip->m_loglevel);
|
536 |
DebugLog::getdbl()->setloglevel(fip->m_loglevel);
|
537 |
TempDir tmpdir;
|
|
|
538 |
RclConfig myconf(*(fip->m_stableconfig));
|
537 |
RclConfig myconf(*(fip->m_stableconfig));
|
539 |
|
538 |
|
540 |
InternfileTask *tsk = 0;
|
539 |
InternfileTask *tsk = 0;
|
541 |
for (;;) {
|
540 |
for (;;) {
|
542 |
if (!tqp->take(&tsk)) {
|
541 |
if (!tqp->take(&tsk)) {
|
543 |
tqp->workerExit();
|
542 |
tqp->workerExit();
|
544 |
return (void*)1;
|
543 |
return (void*)1;
|
545 |
}
|
544 |
}
|
546 |
LOGDEB0(("FsIndexerInternfileWorker: task fn %s\n", tsk->fn.c_str()));
|
545 |
LOGDEB0(("FsIndexerInternfileWorker: task fn %s\n", tsk->fn.c_str()));
|
547 |
if (fip->processonefile(&myconf, tmpdir, tsk->fn, &tsk->statbuf,
|
546 |
if (fip->processonefile(&myconf, tsk->fn, &tsk->statbuf,
|
548 |
tsk->localfields, tsk->mdreapers) !=
|
547 |
tsk->localfields, tsk->mdreapers) !=
|
549 |
FsTreeWalker::FtwOk) {
|
548 |
FsTreeWalker::FtwOk) {
|
550 |
LOGERR(("FsIndexerInternfileWorker: processone failed\n"));
|
549 |
LOGERR(("FsIndexerInternfileWorker: processone failed\n"));
|
551 |
tqp->workerExit();
|
550 |
tqp->workerExit();
|
552 |
return (void*)0;
|
551 |
return (void*)0;
|
|
... |
|
... |
610 |
return FsTreeWalker::FtwError;
|
609 |
return FsTreeWalker::FtwError;
|
611 |
}
|
610 |
}
|
612 |
}
|
611 |
}
|
613 |
#endif
|
612 |
#endif
|
614 |
|
613 |
|
615 |
return processonefile(m_config, m_tmpdir, fn, stp, m_localfields,
|
614 |
return processonefile(m_config, fn, stp, m_localfields, m_mdreapers);
|
616 |
m_mdreapers);
|
|
|
617 |
}
|
615 |
}
|
618 |
|
616 |
|
619 |
|
617 |
|
620 |
FsTreeWalker::Status
|
618 |
FsTreeWalker::Status
|
621 |
FsIndexer::processonefile(RclConfig *config, TempDir& tmpdir,
|
619 |
FsIndexer::processonefile(RclConfig *config,
|
622 |
const std::string &fn, const struct stat *stp,
|
620 |
const std::string &fn, const struct stat *stp,
|
623 |
const map<string, string>& localfields,
|
621 |
const map<string, string>& localfields,
|
624 |
const vector<MDReaper>& mdreapers)
|
622 |
const vector<MDReaper>& mdreapers)
|
625 |
{
|
623 |
{
|
626 |
////////////////////
|
624 |
////////////////////
|
|
... |
|
... |
657 |
}
|
655 |
}
|
658 |
|
656 |
|
659 |
LOGDEB0(("processone: processing: [%s] %s\n",
|
657 |
LOGDEB0(("processone: processing: [%s] %s\n",
|
660 |
displayableBytes(stp->st_size).c_str(), fn.c_str()));
|
658 |
displayableBytes(stp->st_size).c_str(), fn.c_str()));
|
661 |
|
659 |
|
662 |
FileInterner interner(fn, stp, config, tmpdir, FileInterner::FIF_none);
|
660 |
FileInterner interner(fn, stp, config, FileInterner::FIF_none);
|
663 |
if (!interner.ok()) {
|
661 |
if (!interner.ok()) {
|
664 |
// no indexing whatsoever in this case. This typically means that
|
662 |
// no indexing whatsoever in this case. This typically means that
|
665 |
// indexallfilenames is not set
|
663 |
// indexallfilenames is not set
|
666 |
return FsTreeWalker::FtwOk;
|
664 |
return FsTreeWalker::FtwOk;
|
667 |
}
|
665 |
}
|