3
0
Fork 0

Correctly set ProtocolPrefix and SearchProtocolPrefix for searcher.

Default `protocolPrefix` for the kiwix-lib searcher is `zim:://`.
We have to change it to `/` for all searcher we create else the search's
results will have a `zim://...` url, which will obviously won't work.
better_search_tool
Matthieu Gautier 9 years ago
parent 5989146931
commit 7776eafbfc

@ -942,6 +942,8 @@ int main(int argc, char** argv)
if ( reader->hasFulltextIndex()) {
kiwix::Searcher* searcher = new kiwix::Searcher();
searcher->setProtocolPrefix("/");
searcher->setSearchProtocolPrefix("/search?");
searcher->add_reader(reader, humanReadableId);
globalSearcher->add_reader(reader, humanReadableId);
searchers[humanReadableId] = searcher;

Loading…
Cancel
Save