mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 03:52:35 -04:00
Updating CLucene search and index routines
This commit is contained in:
parent
2ff5f680c8
commit
4d5dcea857
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user