On Fri, Nov 19, 2021 at 10:01:21AM +0100, Adam Sj?gren
wrote:> However the following xapian-check failed (after 16 minutes):
>
> $ xapian-check /z/orne/nzdb/index.compact-2011-11-18
> record:
> baseB blocksize=8K items=10465475 lastblock=142104 revision=1 levels=2
root=601
> B-tree checked okay
> record table structure checked OK
>
> termlist:
> baseB blocksize=8K items=20930950 lastblock=5966465 revision=1 levels=3
root=343098
> B-tree checked okay
> xapian-check: DatabaseError: inflate failed (invalid distance too far
back)
> $
>
> Odd, or?
That's saying the zlib-compressed content is invalid.
The reason the error is after an "okay" is that first of all the
B-tree
structure is checked (and is "okay"), then the structure of the data
stored in the B-tree is checked (so you'd get "termlist table structure
checked OK" normally).
Before investing a lot more effort into this, you could rename
termlist.* out of the way in the compacted table and see if you can
search it. The termlist is only needed for a few things - see the
description of https://trac.xapian.org/ticket/181 for a list - you
might need to adjust your search process temporarily to avoid those
if you make use of any while searching normally.
If that works, then regenerating the broken termlist table entry (or
entries) should be feasible, as the data for them can be determined from
the postlist table (and value table if you use document value slots).
Cheers,
Olly