debug
This commit is contained in:
parent
7ce8bb9ce2
commit
03037e9a65
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: stemdb.cpp,v 1.10 2007-08-01 10:04:53 dockes Exp $ (C) 2005 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: stemdb.cpp,v 1.11 2007-11-08 09:34:17 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,6 +84,7 @@ p_notlowerascii(unsigned int c)
|
|||||||
bool createDb(Xapian::Database& xdb, const string& dbdir, const string& lang)
|
bool createDb(Xapian::Database& xdb, const string& dbdir, const string& lang)
|
||||||
{
|
{
|
||||||
LOGDEB(("StemDb::createDb(%s)\n", lang.c_str()));
|
LOGDEB(("StemDb::createDb(%s)\n", lang.c_str()));
|
||||||
|
Chrono cron;
|
||||||
|
|
||||||
// First build the in-memory stem database:
|
// First build the in-memory stem database:
|
||||||
// We walk the list of all terms, and stem each.
|
// We walk the list of all terms, and stem each.
|
||||||
@ -132,6 +133,8 @@ bool createDb(Xapian::Database& xdb, const string& dbdir, const string& lang)
|
|||||||
lang.c_str()));
|
lang.c_str()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
LOGDEB1(("StemDb::createDb(%s): in memory map built: %.2f S\n",
|
||||||
|
lang.c_str(), cron.secs()));
|
||||||
|
|
||||||
// Create xapian database for stem relations
|
// Create xapian database for stem relations
|
||||||
string stemdbdir = stemdbname(dbdir, lang);
|
string stemdbdir = stemdbname(dbdir, lang);
|
||||||
@ -190,6 +193,7 @@ bool createDb(Xapian::Database& xdb, const string& dbdir, const string& lang)
|
|||||||
newdocument.set_data(record);
|
newdocument.set_data(record);
|
||||||
try {
|
try {
|
||||||
sdb.replace_document(stem, newdocument);
|
sdb.replace_document(stem, newdocument);
|
||||||
|
//sdb.add_document(newdocument);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
LOGERR(("Db::createstemdb: replace failed\n"));
|
LOGERR(("Db::createstemdb: replace failed\n"));
|
||||||
return false;
|
return false;
|
||||||
@ -201,6 +205,8 @@ bool createDb(Xapian::Database& xdb, const string& dbdir, const string& lang)
|
|||||||
// cerr << "\n" << stem << " " << it->second;
|
// cerr << "\n" << stem << " " << it->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOGDEB1(("StemDb::createDb(%s): done: %.2f S\n",
|
||||||
|
lang.c_str(), cron.secs()));
|
||||||
LOGDEB(("Stem map size: %d stems %d mult %d no %d const %d\n",
|
LOGDEB(("Stem map size: %d stems %d mult %d no %d const %d\n",
|
||||||
assocs.size(), stemdiff, stemmultiple, nostem, stemconst));
|
assocs.size(), stemdiff, stemmultiple, nostem, stemconst));
|
||||||
wiper.do_it = false;
|
wiper.do_it = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user