Navin Kabra <navin@smriti.com> writes: > > Specifically, I have a few threads/messages that don't have any tags, > but still show up in notmuch search for those tags. And using notmuch > tag to remove (or add) any tags on these threads has no effect. Doing > a `notmuch compact` does not fix this issue. 0) As a first step, run xapian-check, something like % xapian-check ~/Maildir/.notmuch/xapian If your database is corrupted, there's not much notmuch can do about it (except maybe make things worse). I would think that compact would have detected any corruption, but you never know. > > ~$ notmuch search thread:0000000000058ca0 and tag:inbox > thread:0000000000058ca0 February 22 [1/1] Mandar Joshi; > Announcing TiECon Pune 2017 - Pune's largest, most energizing > startup event! () 1) Can you also see the problem by looking at individual message-ids?, e.g. using notmuch show 2) In particular Does notmuch dump generate the correct output? If so, then dump your tags, rebuild your database, and reload the tags is one option.