From e0a8b13ef19916b33b4708f8fc4cd56fd30ca875 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Sat, 7 Apr 2012 19:31:11 +0000 Subject: [PATCH] + clucene fix for the new indexer --- src/indexer/Makefile.am.orig | 6 ++++-- src/installer/kiwix-install.cpp | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/indexer/Makefile.am.orig b/src/indexer/Makefile.am.orig index 3787a36..226baef 100644 --- a/src/indexer/Makefile.am.orig +++ b/src/indexer/Makefile.am.orig @@ -7,7 +7,8 @@ kiwix_index_SOURCES= \ ../common/unaccent.cpp \ ../common/kiwix/indexer.cpp \ ../common/kiwix/reader.cpp \ - ../common/kiwix/xapianIndexer.cpp + ../common/kiwix/xapianIndexer.cpp \ + ../common/kiwix/cluceneIndexer.cpp \ include_HEADERS= \ ../common/kiwix/xapian/myhtmlparse.h \ ../common/kiwix/xapian/namedentities.h \ @@ -15,7 +16,8 @@ include_HEADERS= \ ../common/unaccent.h \ ../common/kiwix/indexer.h \ ../common/kiwix/reader.h \ - ../common/kiwix/xapianIndexer.h + ../common/kiwix/xapianIndexer.h \ + ../common/kiwix/cluceneIndexer.h kiwix_index_CXXFLAGS=$(LIBXAPIAN_CFLAGS) $(LIBCLUCENE_CFLAGS) $(LIBICU_CFLAGS) $(LIBZIM_CFLAGS) -I../common/ kiwix_index_LDFLAGS=$(LIBXAPIAN_LDFLAGS) $(LIBCLUCENE_LDFLAGS) $(LIBICU_LDFLAGS) $(LIBZIM_LDFLAGS) kiwix_index_LDADD=../zimlib/src/.libs/libzim.a diff --git a/src/installer/kiwix-install.cpp b/src/installer/kiwix-install.cpp index ac1d6f4..db7339c 100644 --- a/src/installer/kiwix-install.cpp +++ b/src/installer/kiwix-install.cpp @@ -170,10 +170,10 @@ int main(int argc, char **argv) { try { if (backend == CLUCENE) { #ifndef _WIN32 - indexer = new kiwix::CluceneIndexer(contentPath, indexPath); + indexer = new kiwix::CluceneIndexer(); #endif } else { - indexer = new kiwix::XapianIndexer(contentPath, indexPath); + indexer = new kiwix::XapianIndexer(); } } catch (...) { cerr << "Unable to index '" << contentPath << "'." << endl; @@ -181,7 +181,7 @@ int main(int argc, char **argv) { } if (indexer != NULL) { - indexer->start(); + indexer->start(contentPath, indexPath); while (indexer->isRunning()) { sleep(1); }