mirror of https://github.com/kiwix/libkiwix.git
Use new libzim method `hasFulltextIndex` to check for fulltext index.
This commit is contained in:
parent
ba302bed33
commit
d51000c4a9
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue