Only write to whoosh after a successfull commit