Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fulltextsearch seems broken under certain conditions #676

Open
kelson42 opened this issue May 18, 2024 · 3 comments
Open

Fulltextsearch seems broken under certain conditions #676

kelson42 opened this issue May 18, 2024 · 3 comments
Assignees
Milestone

Comments

@kelson42
Copy link
Contributor

I have loaded two "generations" of the same Gutenberg title:

$ ls *mul*
gutenberg_mul_all_2023-05.zim  gutenberg_mul_all_2023-08.zim
$ kiwix-serve --port=8080 *mul*zim
The Kiwix server is running and can be accessed in the local network at: http://192.168.0.168:8080

Once online, I have chosen one and started a fulltext search and I have got:
image

This looks like a bug, why I'm not able to fulltext search in my ZIM file?

@kelson42
Copy link
Contributor Author

@veloman-yunkan I never have seen this error before, I suspect this has been introduced quite recently.

@kelson42 kelson42 added this to the 3.8.0 milestone May 18, 2024
@veloman-yunkan
Copy link
Collaborator

veloman-yunkan commented Jan 30, 2025

This error comes from kiwix/libkiwix#838 which restricts the search to a set of books all in the same (single) language. In the reported scenario we deal with a search in a single ZIM file but the problem is that it is a multi-language ZIM file! Hence the search operation is prone to various problems discussed in kiwix/libkiwix#785, and thus the error is justified. On the other hand, this makes all multi-language ZIM files unsearchable which is plain silly. I can easily relax the check that prevents search from working on such a ZIM file but that will be only part of the full fix. For full-text search to work correctly the xapian database must be properly populated, therefore indexing of multi-language ZIM files must be enhanced in libzim. Also we will have to specify the query language when searching in a multi-language ZIM file.

@mgautierfr @kelson42

@kelson42
Copy link
Contributor Author

kelson42 commented Feb 3, 2025

@veloman-yunkan Thank you for the explanation. @mgautierfr will work very soon on openzim/libzim#734 and that should fix this bug. Postponing to the next release.

@kelson42 kelson42 modified the milestones: 3.8.0, 3.9.0 Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants