def METHOD_NAME(self, dataset: Dataset, root_index_name: str) -> str:
    """Retrieve ES indices based on a given root_index_name.
    Args:
        dataset: dataset object
        root_index_name: A root index name like "run-data"
    Raises:
        APIAbort(CONFLICT) if indexing was disabled on the target dataset.
    Returns:
        A string that joins all selected indices with ",", suitable for use
        in an Elasticsearch query URI.
    """
    # Datasets marked "archiveonly" aren't indexed, and can't be referenced
    # in APIs that rely on Elasticsearch. Instead, we'll raise a CONFLICT
    # error.
    if Metadata.getvalue(dataset, Metadata.SERVER_ARCHIVE):
        raise APIAbort(HTTPStatus.CONFLICT, "Dataset indexing was disabled")
    index_keys = IndexMap.indices(dataset, root_index_name)
    indices = ",".join(index_keys)
    return indices