Another part of this bug has been fixed in
2e1018bc - I'm still wondering why pdf or doc appear in the search index, but now I can explain at least why that warning happens when the last occurrence of a word has been deleted. lupo49, can you still reproduce the problem? If the problem can't be reproduced anymore I think this bug can be closed.