@classmethod
def build_aggregation(cls, fields, size, filters=None):
    """Build the aggregation for a field or a list of fields.

      /!\\ The fields MUST be multifield with an untouched sub-field

    field: list or str
    size: int
    filters: list

    return: aggs

    """
    aggs_list = {}
    aggs = {}
    if isinstance(fields, str):
        fields = fields,
    for field in fields:
        if isinstance(field, (tuple, list)):
            nested_aggs = []
            for idx, sub_field in enumerate(field):
                if idx == 0:
                    continue
                nested_aggs.append({'aggregations': {sub_field: {'terms': {
                    'field': '%s.untouched' % sub_field}}}})
            agg = {field[0]: {'field': '%s.untouched' % field[0], 'size':
                size, 'nested_aggs': nested_aggs}}
        else:
            agg = {field: {'field': '%s.untouched' % field, 'size': size}}
        if aggs_list:
            aggs_list.update(agg)
        else:
            aggs_list = agg
    for key, agg in aggs_list.items():
        aggs_name = key.replace('.', '_')
        aggregation = {'terms': {'field': agg['field'], 'size': agg['size'],
            'order': {'_count': 'desc'}}}
        if filters:
            aggs['%s_filtered' % aggs_name] = {'filter': filters}
            aggs['%s_filtered' % aggs_name]['aggregations'] = {aggs_name:
                aggregation}
        else:
            aggs[aggs_name] = aggregation
        if agg.get('nested_aggs'):
            aggs[aggs_name] = {'terms': aggs[aggs_name]['terms'],
                'aggregations': agg['nested_aggs'][0]['aggregations']}
    return aggs
