Support multi-zims search in kiwix-lib.

All the code was already in zimlib.
It is mainly a update of the code using zimlib.

No JNI change for now to not break the API.
This commit is contained in:
Matthieu Gautier
2017-07-05 11:35:36 +02:00
parent 3991e648ed
commit 9cc329dbd2
3 changed files with 54 additions and 8 deletions

View File

@ -56,9 +56,11 @@ struct SearcherInternal;
class Searcher
{
public:
Searcher();
Searcher(const string& xapianDirectoryPath, Reader* reader);
~Searcher();
void add_reader(Reader* reader, const std::string& humanReaderName);
void search(std::string& search,
unsigned int resultStart,
unsigned int resultEnd,
@ -84,7 +86,8 @@ class Searcher
const unsigned int resultEnd,
const bool verbose = false);
Reader* reader;
std::vector<Reader*> readers;
std::vector<std::string> humanReaderNames;
SearcherInternal* internal;
std::string searchPattern;
std::string protocolPrefix;