ok with compression
This commit is contained in:
parent
fc685490aa
commit
0a9537fef6
@ -221,9 +221,6 @@ bool BeagleQueueIndexer::getFromCache(const string& udi, Rcl::Doc &dotdoc,
|
|||||||
{
|
{
|
||||||
string dict;
|
string dict;
|
||||||
|
|
||||||
// This is horribly inefficient, especially while reindexing from
|
|
||||||
// cache, and needs fixing either by saving the offsets during the
|
|
||||||
// forward scan, or using an auxiliary isam map
|
|
||||||
if (!m_cache->get(udi, dict, data))
|
if (!m_cache->get(udi, dict, data))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -447,10 +444,6 @@ BeagleQueueIndexer::processone(const string &path,
|
|||||||
// Document signature for up to date checks: none.
|
// Document signature for up to date checks: none.
|
||||||
dotdoc.sig = "";
|
dotdoc.sig = "";
|
||||||
|
|
||||||
// doc fields not in meta, needing saving to the cache
|
|
||||||
dotfile.m_fields.set("fmtime", dotdoc.fmtime, "");
|
|
||||||
dotfile.m_fields.set("fbytes", dotdoc.fbytes, "");
|
|
||||||
|
|
||||||
dotdoc.meta[Rcl::Doc::keybcknd] = "BGL";
|
dotdoc.meta[Rcl::Doc::keybcknd] = "BGL";
|
||||||
if (!m_db->addOrUpdate(udi, "", dotdoc))
|
if (!m_db->addOrUpdate(udi, "", dotdoc))
|
||||||
return FsTreeWalker::FtwError;
|
return FsTreeWalker::FtwError;
|
||||||
@ -491,24 +484,25 @@ BeagleQueueIndexer::processone(const string &path,
|
|||||||
doc.sig = "";
|
doc.sig = "";
|
||||||
doc.url = dotdoc.url;
|
doc.url = dotdoc.url;
|
||||||
|
|
||||||
// doc fields not in meta, needing saving to the cache
|
|
||||||
dotfile.m_fields.set("fmtime", dotdoc.fmtime, "");
|
|
||||||
dotfile.m_fields.set("fbytes", dotdoc.fbytes, "");
|
|
||||||
|
|
||||||
doc.meta[Rcl::Doc::keybcknd] = "BGL";
|
doc.meta[Rcl::Doc::keybcknd] = "BGL";
|
||||||
if (!m_db->addOrUpdate(udi, "", doc))
|
if (!m_db->addOrUpdate(udi, "", doc))
|
||||||
return FsTreeWalker::FtwError;
|
return FsTreeWalker::FtwError;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Copy to cache
|
// Copy to cache
|
||||||
{
|
{
|
||||||
stringstream o;
|
// doc fields not in meta, needing saving to the cache
|
||||||
dotfile.m_fields.write(o);
|
dotfile.m_fields.set("fmtime", dotdoc.fmtime, "");
|
||||||
|
dotfile.m_fields.set("fbytes", dotdoc.fbytes, "");
|
||||||
|
dotfile.m_fields.set("udi", udi, "");
|
||||||
string fdata;
|
string fdata;
|
||||||
file_to_string(path, fdata);
|
file_to_string(path, fdata);
|
||||||
if (!m_cache->put(udi, o.str(), fdata))
|
if (!m_cache->put(udi, &dotfile.m_fields, fdata, 0)) {
|
||||||
|
LOGERR(("BeagleQueueIndexer::prc1: cache_put failed; %s\n",
|
||||||
|
m_cache->getReason().c_str()));
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dounlink = true;
|
dounlink = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user