Updating CLucene search and index routines

This commit is contained in:
synhershko 2011-08-03 07:48:31 +00:00
parent 2ff5f680c8
commit 4d5dcea857
2 changed files with 8 additions and 3 deletions

View File

@ -104,6 +104,7 @@ int main(int argc, char **argv) {
/* Start the indexing */
if (indexer != NULL) {
while (indexer->indexNextPercent(verboseFlag)) {};
delete indexer;
} else {
cerr << "Unable instanciate the Kiwix indexer." << endl;
exit(1);

View File

@ -32,12 +32,14 @@ void usage() {
int main(int argc, char **argv) {
/* Init the variables */
char *indexPath = NULL;
char *search = NULL;
//const char *indexPath = "/home/itamar/.www.kiwix.org/kiwix/43k0i1j4.default/6d2e587b-d586-dc6a-dc6a-e4ef035a1495d15c.index";
//const char *indexPath = "/home/itamar/testindex";
const char *indexPath = NULL;
const char *search = NULL;
bool verboseFlag = false;
int option_index = 0;
int c = 0;
supportedBackend backend = XAPIAN;
supportedBackend backend = CLUCENE;
kiwix::Searcher *searcher = NULL;
@ -110,6 +112,8 @@ int main(int argc, char **argv) {
while (searcher->getNextResult(url, title, score)) {
cout << title << endl;
}
delete searcher;
kiwix::CluceneSearcher::terminate();
} else {
cerr << "Unable instanciate the Kiwix searcher." << endl;
exit(1);