@classmethod
def render_select(cls, result, fields=''):
    """Format the result to feed a select with id and name field.

    result: dict
    fields: list

    return: list with id and name

    """
    if not fields:
        fields = cls.ID_KEY, cls.KEYWORD_FIELD
    formatted_result = []
    for p in result['hits']['hits']:
        if fields[0] == '_id':
            first_field = p[fields[0]]
        else:
            first_field = p['_source'][fields[0]]
        formatted_result.append((first_field, p['_source'][fields[1]]))
    return formatted_result
