def update_positions(l,index):
    """[Update position of the index in query function, increase of 1 the index of the doc with the minimum ID]

    Args:
        l ([list]): [list of current tuples (doc, tf_idf)]
        index ([list]): [list of indies for all the values of the queries]

    Returns:
        [list]: [updated index]
    """
    
    #we want to consider the minimum id of the documents, t = list of tuples (doc, tf_idf), t[0] = documents
    min_value= min(l, key = lambda t: t[0])[0]
    
    #update only the index of minimum values 
    for i,elem in enumerate(l):
        if elem[0]==min_value:
            index[i]+=1
            
    return index