From 8336c22f5677008abb47adeca324d6ab27c79dff Mon Sep 17 00:00:00 2001 From: kelson42 Date: Sun, 18 Sep 2011 21:46:55 +0000 Subject: [PATCH] + default backend is xapian --- src/searcher/kiwix-search.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/searcher/kiwix-search.cpp b/src/searcher/kiwix-search.cpp index d4a10f2..55d910d 100644 --- a/src/searcher/kiwix-search.cpp +++ b/src/searcher/kiwix-search.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv) { bool verboseFlag = false; int option_index = 0; int c = 0; - supportedBackend backend = CLUCENE; + supportedBackend backend = XAPIAN; kiwix::Searcher *searcher = NULL; @@ -112,8 +112,14 @@ int main(int argc, char **argv) { while (searcher->getNextResult(url, title, score)) { cout << title << endl; } + delete searcher; - kiwix::CluceneSearcher::terminate(); + + if (backend == CLUCENE) { + kiwix::CluceneSearcher::terminate(); + } else { + // kiwix::XapianSearcher::terminate(); + } } else { cerr << "Unable instanciate the Kiwix searcher." << endl; exit(1);