Use new libzim method `hasFulltextIndex` to check for fulltext index.

This commit is contained in:
Matthieu Gautier 2020-12-08 18:53:38 +01:00 committed by Emmanuel Engelhart
parent ba302bed33
commit d51000c4a9
1 changed files with 1 additions and 12 deletions

View File

@ -390,18 +390,7 @@ bool Reader::hasFulltextIndex() const
return false;
}
for(auto path: {"Z//fulltextIndex/xapian", "X/fulltext/xapian"}) {
try {
auto entry = zimArchive->getEntryByPath(path);
auto item = entry.getItem(true);
auto accessInfo = item.getDirectAccessInformation();
if (accessInfo.second) {
return true;
}
} catch(...) {}
}
return false;
return zimArchive->hasFulltextIndex();
}
/* Search titles by prefix */