diff --git a/src/common/kiwix/cluceneIndexer.h b/src/common/kiwix/cluceneIndexer.h index 5c8a92821..98e85db6b 100644 --- a/src/common/kiwix/cluceneIndexer.h +++ b/src/common/kiwix/cluceneIndexer.h @@ -21,6 +21,7 @@ #define KIWIX_CLUCENE_INDEXER_H #include +#include #include "indexer.h" #define MAX_BUFFER_SIZE 4200000 diff --git a/src/common/kiwix/cluceneSearcher.cpp b/src/common/kiwix/cluceneSearcher.cpp index 62f414677..7b1425252 100644 --- a/src/common/kiwix/cluceneSearcher.cpp +++ b/src/common/kiwix/cluceneSearcher.cpp @@ -53,12 +53,15 @@ void CluceneSearcher::terminate() } std::string toString(const TCHAR* s){ + /* Comment out for CLucene 2.3 int32_t len = _tcslen(s); char* buf = new char[len+1]; STRCPY_WtoA(buf,s,len+1); string ret = buf; delete[] buf; - return ret; + */ + return ""; + // return ret; } /* Search strings in the database */ @@ -66,6 +69,7 @@ std::string toString(const TCHAR* s){ const unsigned int resultEnd, const bool verbose) { // Parse query + /* Comment out for Clucene 2.3 lucene::analysis::standard::StandardAnalyzer* analyzer = new lucene::analysis::standard::StandardAnalyzer(); QueryParser* parser = new QueryParser(_T("content"), analyzer); STRCPY_AtoT(buffer, search.c_str(), MAX_BUFFER_SIZE); @@ -96,6 +100,7 @@ std::string toString(const TCHAR* s){ i + 1, d->get(_T("title")), d->get(_T("url")), hits->score(i)); } + */ /* Result result; result.url = doc.get_data(); @@ -105,8 +110,8 @@ std::string toString(const TCHAR* s){ this->results.push_back(result); */ - delete hits; - delete query; +// delete hits; + // delete query; return; } diff --git a/src/common/kiwix/cluceneSearcher.h b/src/common/kiwix/cluceneSearcher.h index da4730edc..f6c2f4a35 100644 --- a/src/common/kiwix/cluceneSearcher.h +++ b/src/common/kiwix/cluceneSearcher.h @@ -21,6 +21,7 @@ #define KIWIX_CLUCENE_SEARCHER_H #include +#include #include #include "searcher.h"