mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-28 05:49:35 +00:00
Remove get_readerIndex in favor of get_zimId
The function get_readerIndex was used to get the zimId using an ordered vector of readers. Now we can use get_zimId directly.
This commit is contained in:
committed by
Matthieu Gautier
parent
c35f6f9142
commit
e2f6d91d51
@ -77,9 +77,7 @@ std::string SearchRenderer::getHtml()
|
||||
result.set("title", p_result->get_title());
|
||||
result.set("url", p_result->get_url());
|
||||
result.set("snippet", p_result->get_snippet());
|
||||
auto readerIndex = p_result->get_readerIndex();
|
||||
auto reader = mp_searcher->get_reader(readerIndex);
|
||||
result.set("resultContentId", mp_nameMapper->getNameForId(reader->getId()));
|
||||
result.set("resultContentId", mp_nameMapper->getNameForId(p_result->get_zimId()));
|
||||
|
||||
if (p_result->get_wordCount() >= 0) {
|
||||
result.set("wordCount", kiwix::beautifyInteger(p_result->get_wordCount()));
|
||||
|
Reference in New Issue
Block a user