def indices(this, that, axis=semantics.axis_default, missing='raise'):
    """Find indices such that this[indices] == that
    If multiple indices satisfy this condition, the first index found is returned

    Parameters
    ----------
    this : indexable object
        items to search in
    that : indexable object
        items to search for
    axis : int, optional
        axis to operate on
    missing : {'raise', 'ignore', 'mask' or int}
        if `missing` is 'raise', a KeyError is raised if not all elements of `that` are present in `this`
        if `missing` is 'mask', a masked array is returned,
        where items of `that` not present in `this` are masked out
        if `missing` is 'ignore', all elements of `that` are assumed to be present in `this`,
        and output is undefined otherwise
        if missing is an integer, this is used as a fill-value

    Returns
    -------
    indices : ndarray, [that.size], int
        indices such that this[indices] == that

    Notes
    -----
    May be regarded as a vectorized numpy equivalent of list.index
    """
    this = as_index(this, axis=axis, lex_as_struct=True)
    # use this for getting this.keys and that.keys organized the same way;
    # sorting is superfluous though. make sorting a cached property?
    # should we be working with cached properties generally?
    # or we should use sorted values, if searchsorted can exploit this knowledge?
    that = as_index(that, axis=axis, base=True, lex_as_struct=True)

    # use raw private keys here, rather than public unpacked keys
    insertion = np.searchsorted(this._keys, that._keys, sorter=this.sorter, side='left')
    indices = np.take(this.sorter, insertion, mode='clip')

    if missing != 'ignore':
        invalid = this._keys[indices] != that._keys
        if missing == 'raise':
            if np.any(invalid):
                raise KeyError('Not all keys in `that` are present in `this`')
        elif missing == 'mask':
            indices = np.ma.masked_array(indices, invalid)
        else:
            indices[invalid] = missing
    return indices