+ clucene fix for the new indexer

This commit is contained in:
kelson42 2012-04-07 19:31:11 +00:00
parent 31b3308937
commit e0a8b13ef1
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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);
}