def flush(self, batch_size=1000):
        """
        Delete all autocomplete indexes and metadata.
        """
        keys = self.database.keys(self.namespace + ':*')
        for i in range(0, len(keys), batch_size):
            self.database.delete(*keys[i:i + batch_size])