def build_index(index_list):
    """This function builds two index. One with just name and version the other
    including vendor (aka group) string

    :param index_list:
    :return: Normal index and vendor index
    """
    idx = {}
    vendor_idx = {}
    for d in index_list:
        ver_range_str = str(d.get('min_version')) + '-' + str(d.get(
            'max_version'))
        curr_list = idx.get(d['name'], [])
        curr_list.append(ver_range_str)
        idx[d['name']] = curr_list
        if d.get('vendor'):
            vendor_idx_key = d.get('vendor') + '|' + d['name']
            vendor_list = vendor_idx.get(vendor_idx_key, [])
            vendor_list.append(ver_range_str)
            vendor_idx[vendor_idx_key] = vendor_list
    return idx, vendor_idx
