-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
[SPEC] TitlePtrList should not contains all entries #397
Comments
Thinking about this, I come with a solution. The idea is not to change the We already have indexes, not pointed by the zim header. We use plain entry at well known path to found them :
This way :
This would be at the cost of (a bit) bigger zim file. Random entriesUsing the new Suggestions (case insensitive search).In kiwix-lib, if zim file has no xapian title index, we search for title. But as we want to be case insensitive and Efficient orderInstead of generating the "efficient order" at reading (https://github.com/openzim/libzim/blob/master/src/fileimpl.cpp#L351-L371) , we could store a list of entries in this order in the zim file itself. CategoriesWhen we implement categories or entry extradata (see #325), we could add a index to list all entries in a specific category, or using specific extradata order. |
Currently the
TitlePtrList
contains all the entries in the zim file, using theNS(Title|Url)
key to sort the entries.title
(using theurl
if thetitle
is empty).Most of the time it is "ok" as only
A
entries have title. As we sort first by namespace, entries with title are sorted correctly (without url interleaved) and other entries (I
/J
) are sorted by url.As we search by title only on the
A
namespace (suggestion system), this system mostly works.But :
TitlePtrList
bigger than needed (no need to sort entries without title by title).If fact, from the begining, the
TitlePtrList
should :However this breaks the compatibility as :
TitlePtrList
will not beArticleCount
anymore. So the header has to be changed to store the size ofTitlePtrList
.TitlePtrList
must use a different comparison function.I have no plan to change this rigth now. But we may need to do it some time. This ticket is here to help us keep this in mind.
The text was updated successfully, but these errors were encountered: