def METHOD_NAME(self, text_dataset):
    '''Add to index.'''
    # Single process only.
    if torch.distributed.get_rank() == 0:
        self._add(text_dataset)
    # Wait for rank 0.
    torch.distributed.barrier()
    # Get output index path, for return.
    return self.get_added_index_path()