[Xapian-discuss] Failure trying to update document.

Olly Betts olly at survex.com
Sun Jan 31 22:19:10 GMT 2010


On Sun, Jan 31, 2010 at 08:00:02PM +0100, Jesper Krogh wrote:
> Jesper Krogh wrote:
> > Which is kind of odd, it matches the documents terms gets the docid but
> > fails to get the termslist?

The postlist is used to find the documents matching particular terms.  The
termlist holds the reverse mapping - for each document, it stores the list
of terms which index it.

> $ xapian-check termlist.DB
> baseA blocksize=8K items=2980957 lastblock=2357252 revision=2452
> levels=3 root=108
> B-tree error 90
> xapian-check: btree error
> 
> Can I somehow "fix" it?

The error here is that the keys in the Btree don't satisfy an expected
invariant, so it's hard to know quite how corrupted things are.

If you have the original data, rebuilding is the simplest and safest
option.

You may be able to use copydatabase to generate a good copy.  If the
issue is just a missing termlist entry for one (or several) documents,
that would skip those, but if things are more messed up it may fail.

If there's a full set of baseB files, you could try moving *.baseA to
a temporary directory and see if the database passes xapian-check.  This
will roll back to the previous committed revision.

Any idea what might have happened?  I've not heard of corruption like
this before.

Cheers,
    Olly



More information about the Xapian-discuss mailing list