3 Commits
3.1.1 ... 3.1.2

Author SHA1 Message Date
Matthieu Gautier
fdec897bc7 Release 3.1.2 2020-07-02 15:20:01 +02:00
Matthieu Gautier
764dd8848b Merge pull request #391 from kiwix/new_kiwixlib_suggestion_api
Use new suggestion API of kiwix-lib.
2020-07-02 14:39:53 +02:00
Matthieu Gautier
4a944cc901 Use new suggestion API of kiwix-lib.
Old API is not threadsafe and is deprecated.
2020-07-01 16:51:41 +02:00
3 changed files with 11 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
kiwix-tools 3.1.2
=================
* Use new threadsafe API of kiwix-lib to do suggestions search.
kiwix-tools 3.1.1
=================

View File

@@ -1,5 +1,5 @@
project('kiwix-tools', 'cpp',
version : '3.1.1',
version : '3.1.2',
license : 'GPL',
default_options: ['c_std=c11', 'cpp_std=c++11', 'werror=true'])
@@ -13,7 +13,7 @@ if static_linkage
endif
thread_dep = dependency('threads')
kiwixlib_dep = dependency('kiwix', version:'>=9.1.0', static:static_linkage)
kiwixlib_dep = dependency('kiwix', version:'>=9.3.0', static:static_linkage)
microhttpd_dep = dependency('libmicrohttpd', static:static_linkage)
z_dep = dependency('zlib', static:static_linkage)

View File

@@ -90,10 +90,10 @@ int main(int argc, char** argv)
if (pattern != NULL) {
std::cout << "Searching suggestions for: " << pattern << std::endl;
reader->searchSuggestionsSmart(pattern, 10);
while (reader->getNextSuggestion(suggestion)) {
std::cout << suggestion << std::endl;
kiwix::SuggestionsList_t suggestions;
reader->searchSuggestionsSmart(pattern, 10, suggestions);
for (auto& suggestion: suggestions) {
std::cout << suggestion[0] << std::endl;
}
}