I have just noticed that there are no tests for this and I think we should at least have some that check whether indexing is doing its job correctly.
E.g. ("index" means all indexes, last-revs-index as well as all-revs-index):
a) assert that x is not in index, create a new item x (first revision), assert that x is in index
b) update item (create new revision), assert that changes are reflected in the index
c) destroy item, assert that item is not in index any more