def construct_search(**query):
    """
    simplified utility to construct query dict for the wos query post

    :param query: form AI="A-1234-5678", PY="2016-2018", etc.
    :return: the query dict as the input of WosQuery
    """
    search_dict = {}
    i = 0
    for key, value in query.items():
        i += 1
        vi = 'value(input' + str(i) + ')'
        vs = 'value(select' + str(i) + ')'
        search_dict[vi] = value
        search_dict[vs] = key
    l = len(query)
    for i in range(l):
        for j in range(i + 1, l):
            vb = 'value(bool_' + str(i + 1) + '_' + str(j + 1) + ')'
            search_dict[vb] = 'AND'
    search_dict['fieldCount'] = l
    return search_dict
