Simplify and fix search index test initialisation (and emptying).

Try to ensure that we don't delete the production search index!