def _flatten_to_dict(list_of_facets):
    """
    Simple helper that flattens the solr facet into a dict.
    """
    facet = {'sort': []}
    for i in range(0, len(list_of_facets), 2):
        facet['sort'].append(list_of_facets[i])
        facet[list_of_facets[i]] = list_of_facets[i+1]

    return facet