3
0
Fork 0

Add support of embedded ft-index in zim for kiwix-serve and kiwix-search.

- kiwix-search will try the embedded ft-index if no indexPath is specified
  in the library.xml or command argument.
- kiwix-search also uses xapianSearcher and xapianSearcher needs zimlib,
  so add zimlib in compilation flag for searcher.
- kiwix-serve already depends on zimlib.
small_fixes
Matthieu Gautier 10 years ago
parent d8acb2328c
commit 2fc94514f8

@ -602,8 +602,12 @@ int main(int argc, char **argv) {
string humanReadableId = currentBook.getHumanReadableIdFromPath();
readers[humanReadableId] = reader;
/* Instanciate the ZIM index (if necessary) */
if (!indexPath.empty()) {
/* Try to instanciate the zim index.
* If there is no specified indexPath, try to open the
* embedded index in the zim. */
if (indexPath.empty()) {
indexPath = zimPath;
}
try {
kiwix::Searcher *searcher = new kiwix::XapianSearcher(indexPath);
searcher->setProtocolPrefix("/");
@ -616,7 +620,6 @@ int main(int argc, char **argv) {
}
}
}
}
/* Compute the Welcome HTML */
string welcomeBooksHtml;

Loading…
Cancel
Save