mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Always set the humanReadableName with the readable in kiwix-search.
We always need a humanReadableName associated with a content to search in. Do not separate the two values (human readable name and zim) in two different functions. This way, we avoid miss-use of the Searcher who could lead to segfault.
This commit is contained in:
@ -57,7 +57,9 @@ class Searcher
|
||||
{
|
||||
public:
|
||||
Searcher();
|
||||
Searcher(const string& xapianDirectoryPath, Reader* reader);
|
||||
Searcher(const string& xapianDirectoryPath,
|
||||
Reader* reader,
|
||||
const string& humanReadableName);
|
||||
~Searcher();
|
||||
|
||||
void add_reader(Reader* reader, const std::string& humanReaderName);
|
||||
@ -72,7 +74,6 @@ class Searcher
|
||||
bool setProtocolPrefix(const std::string prefix);
|
||||
bool setSearchProtocolPrefix(const std::string prefix);
|
||||
void reset();
|
||||
void setContentHumanReadableId(const string& contentHumanReadableId);
|
||||
|
||||
#ifdef ENABLE_CTPP2
|
||||
string getHtml();
|
||||
|
Reference in New Issue
Block a user