|
|
|
@ -104,7 +104,14 @@ int main(int argc, char** argv)
|
|
|
|
|
|
|
|
|
|
|
|
if (reader) {
|
|
|
|
if (reader) {
|
|
|
|
searcher = new kiwix::Searcher();
|
|
|
|
searcher = new kiwix::Searcher();
|
|
|
|
searcher->add_reader(reader);
|
|
|
|
bool contians_FTIndex=searcher->add_reader(reader);
|
|
|
|
|
|
|
|
if(!contians_FTIndex){
|
|
|
|
|
|
|
|
std::cerr << "The Zim file does not contain a full-text index." << std::endl;
|
|
|
|
|
|
|
|
if(suggestionFlag){
|
|
|
|
|
|
|
|
exit(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
exit(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
cerr << "Unable to search through zim '" << zimPath << "'." << endl;
|
|
|
|
cerr << "Unable to search through zim '" << zimPath << "'." << endl;
|
|
|
|
exit(1);
|
|
|
|
exit(1);
|
|
|
|
|