@classmethod
def aggregation_select(cls, fields, size=50, select_render=False, full_aggs
    =True, query=None, only_count=False):
    """Get the aggregations for select box.

    use case : aggregation_select("last_name", select_render=True, full_aggs=True)
    return {"last_name": [(u"toto", u"toto (3)"), (u"tata", u"tata (2)"), (u"titi", u"titi (1)")...]}

    you can also pass a list of fields aggregation_select(("last_name", "first_name"))
    check the unit test for more use case!

    fields: list
    size: int
    select: bool (formatted to enter in a select)
    full_aggs: bool (return the doc count or not for the select_render) ex: TRUE --> Tokyo (10) FALSE ---> Tokyo
    query: dict
    only_count: bool if we want only the count example return {"last_name": [(u"toto", u"3"), (u"tata", u"2")...]}

    /!\\ replace the . in the name by _ aggs only support name with _ and -

    return: ElasticSearch result

    """
    if not fields:
        return {}
    my_query = {}
    if not isinstance(fields, (list, tuple)):
        fields = [fields]
    if query:
        if query.get('query'):
            query = query.get('query')
        my_query['query'] = query
    my_query['aggregations'] = cls.build_aggregation(fields, size)
    my_query['size'] = 0
    result = cls.search(my_query, params='search_type=count')
    if select_render:
        return cls.render_select_aggs(result, fields, full_aggs, only_count
            =only_count)
    return result
