You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get the number of results (from `get_matches_estimated() #5
shouldn't we get a generator on reader.search() ? Do the libzim returns a list as-is? It's frequent to have thousands of results on large ZIM files.
I did the same as node-libzim getting 10 results and passing back a string vector. File.h returns Search class unique pointers.
std::unique_ptr<Search> search(const std::string& query, int start, int end) const;
std::unique_ptr<Search> suggestions(const std::string& query, int start, int end) const;
Ah ok I see. that's unfortunate. I didn't realized you hardcoded that. We should definitely be able to set those. But we'd need the number of results (from get_matches_estimated()) as well. How do you plan to address that?
I have file_search since I haven't deleted the old search version waiting for your approval. The other works from C++ sending string vectors of 10, this one runs in Cython using the libzim search object directly.
If you agree then I'll only keep this and delete the C++ search code from the wrapper and add the counts as separate.
Activity
jdcaballerov commentedon Apr 10, 2020
@rgaudin Can you clarify How's the API use of
get_matches_estimated()to close this feature ??I can already use the iterator from Cython for both search and suggestions (
File.h)The first number is the result of
get_matches_estimated()UTF-8 not decoded here but already fixed.
rgaudin commentedon Apr 13, 2020
Thanks for this.
file_search()and notsearch()? Do you intend to keep both versions?Otherwise, we'd need better names like
get_search_results_count()andget_suggestions_results_count()jdcaballerov commentedon Apr 13, 2020
I have
file_searchsince I haven't deleted the oldsearchversion waiting for your approval. The other works from C++ sending string vectors of 10, this one runs in Cython using the libzim search object directly.If you agree then I'll only keep this and delete the C++ search code from the wrapper and add the counts as separate.
jdcaballerov commentedon Apr 13, 2020
Done 054e763