Search | Running | Sailfish OS | All Posts | About Me

Fixing notmuch's issue with Xapian exception

July 02, 2024 — Nico Cartron

Context

I use notmuch a lot, in combination with Mutt.

Recently, notmuch stopped working and indexing new emails, with that error message:

notmuch A Xapian exception occurred at lib/message.cc:1209: No termlist
for document 290872

As I was busy, I didn't spent too much time on it - just a few searches that didn't return any result.

Yesterday, as I really needed to find an email, I looked at it a bit more seriously, and found that email thread on the Debian bugs mailing list.
While it didn't solve my issue, it made me realise that there was a simple step I could try: rename notmuch's database, and relaunch notmuch so that it rebuilds it from scratch.

Fixing the issue

  • I renamed ~/mail/.notmuch/xapian to something else
  • then I launched notmuch new which took a while to complete
  • but once done, I no longer had issues, and I can now search again all my emails with notmuch! <3

Wrap Up

As usual - just come back to the basics!
Since notmuch uses a database and my issue seemed to be with a specific element in that database, rebuilding it seemed like a sensible approach - and it was, since it now works again.


Tags: IT


I don't have any commenting system, but email me (nicolas at ncartron dot org) your comments!
If you like my work, you can buy me a coffee!