Moved docsToPaths() method from confindexer to function in rcldoc to simplify linking. confindexer.o not in librecoll any more.+small std namespace fixes
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
*/
|
||||
class BGLDocFetcher : public DocFetcher{
|
||||
virtual bool fetch(RclConfig* cnf, const Rcl::Doc& idoc, RawDoc& out);
|
||||
virtual bool makesig(RclConfig* cnf, const Rcl::Doc& idoc, string& sig);
|
||||
virtual bool makesig(RclConfig* cnf, const Rcl::Doc& idoc,
|
||||
std::string& sig);
|
||||
virtual ~BGLDocFetcher() {}
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -66,7 +66,8 @@ public:
|
||||
* @param idoc the data gathered from the index for this doc (udi/ipath)
|
||||
* @param sig output.
|
||||
*/
|
||||
virtual bool makesig(RclConfig* cnf, const Rcl::Doc& idoc, string& sig) = 0;
|
||||
virtual bool makesig(RclConfig* cnf, const Rcl::Doc& idoc,
|
||||
std::string& sig) = 0;
|
||||
virtual ~DocFetcher() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -211,31 +211,6 @@ bool ConfIndexer::indexFiles(list<string>& ifiles, int flag)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ConfIndexer::docsToPaths(vector<Rcl::Doc> &docs, vector<string> &paths)
|
||||
{
|
||||
for (vector<Rcl::Doc>::iterator it = docs.begin(); it != docs.end(); it++) {
|
||||
Rcl::Doc &idoc = *it;
|
||||
string backend;
|
||||
idoc.getmeta(Rcl::Doc::keybcknd, &backend);
|
||||
|
||||
// This only makes sense for file system files: beagle docs are
|
||||
// always up to date because they can't be updated in the cache,
|
||||
// only added/removed. Same remark as made inside internfile, we
|
||||
// need a generic way to handle backends.
|
||||
if (!backend.empty() && backend.compare("FS"))
|
||||
continue;
|
||||
|
||||
// Filesystem document. The url has to be like file://
|
||||
if (idoc.url.find(cstr_fileu) != 0) {
|
||||
LOGERR("idx::docsToPaths: FS backend and non fs url: [" <<
|
||||
idoc.url << "]\n");
|
||||
continue;
|
||||
}
|
||||
paths.push_back(idoc.url.substr(7, string::npos));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Update index for specific documents. The docs come from an index
|
||||
// query, so the udi, backend etc. fields are filled.
|
||||
bool ConfIndexer::updateDocs(std::vector<Rcl::Doc> &docs, IxFlag flag)
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ class ConfIndexer {
|
||||
/** Update index for list of documents given as list of docs (out of query)
|
||||
*/
|
||||
bool updateDocs(vector<Rcl::Doc> &docs, IxFlag f = IxFNone);
|
||||
static bool docsToPaths(vector<Rcl::Doc> &docs, vector<string> &paths);
|
||||
|
||||
/** Purge a list of files. */
|
||||
bool purgeFiles(list<string> &files, int f = IxFNone);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user