openzim / phet

Scraper for PhET Science & Math Interactive Simulations
https://download.kiwix.org/zim/phet
Apache License 2.0
7 stars 3 forks source link

No Fulltext search nor suggestions on https://library.kiwix.org/phet_fr/ #180

Closed kelson42 closed 1 year ago

kelson42 commented 1 year ago

From libkiwix created by kelson42: kiwix/libkiwix#851

See: image image

I don't understand why, because:

$ zimdump list --ns=X phet_fr_2021-08.zim 
X/fulltext/xapian
X/title/xapian

and

$zimdump list --detail --ns=A phet_fr_2021-08.zim  | more
path: A/acid-base-solutions_fr.html
* title:          Solutions Acido-basiques
* idx:            447
* type:           item
* mime-type:      text/html
* item size:      11992
path: A/area-builder_fr.html
* title:          Constructeur d'Aire
* idx:            448
* type:           item
* mime-type:      text/html
* item size:      12014
path: A/area-model-algebra_fr.html
* title:          Modélisation par les aires - Algèbre
* idx:            449
* type:           item
* mime-type:      text/html
* item size:      3411

Downloading the ZIM at https://download.kiwix.org/zim/phet/phet_fr_2021-08.zim

It looks like a problem to support "older" ZIM file somehow... but not a recent regression of libkiwix.

kelson42 commented 1 year ago

@veloman-yunkan Thank you, I will check this in the scraper.

kelson42 commented 1 year ago

The title DB is empty (note items=0 for all but postlist which probably contains the list of metadata keys):

$ zimdump show --url=X/title/xapian phet_fr_2021-08.zim > titledb.xapian 
$ xapian-check titledb.xapian 
docdata:
blocksize=8K items=0 firstunused=1 revision=1 levels=0 root=(faked)
void B-tree checked okay
docdata table structure checked OK

termlist:
blocksize=8K items=0 firstunused=3 revision=1 levels=0 root=2
B-tree checked okay
termlist table structure checked OK

postlist:
blocksize=8K items=3 firstunused=2 revision=1 levels=0 root=1
B-tree checked okay
postlist table structure checked OK

position:
blocksize=8K items=0 firstunused=1 revision=1 levels=0 root=(faked)
void B-tree checked okay
position table structure checked OK

spelling:
blocksize=8K items=0 firstunused=1 revision=1 levels=0 root=(faked)
void B-tree checked okay
spelling table: Don't know how to check structure

synonym:
blocksize=8K items=0 firstunused=1 revision=1 levels=0 root=(faked)
void B-tree checked okay
synonym table: Don't know how to check structure

No errors found

Same for the fulltext DB.

Thus this is a problem with the creator of that ZIM file.