from pathlib import Path


def join_index_path(data_path: Path, reference_id: str, index_id: str) -> Path:
    """
    Return the path to an index.

    :param data_path: the application data path
    :param reference_id: the ID of the parent reference
    :param index_id: the ID of the index
    :return: the index path
    """
    return data_path / "references" / reference_id / index_id