@classmethod
def get_by_id(cls, id, raw=False):
    """Can't use the regular get_by_id because we don't know in which index we search."""
    cls.refresh()
    myindex = cls.get_index_name(mode='all_index')
    result = cls.search(query={'query': {'term': {'_id': id}}}, myindex=myindex
        )
    if result['hits']['total'] > 0:
        result = result['hits']['hits'][0]
    else:
        return {}
    if not raw and result:
        result = result['_source']
        if not result.get('id'):
            result['id'] = id
    return result
