def get_term_apparitions(index_name, es, term):
    """ Return a text in ElasticSearch with the param id

    :param index_name: ElasticSearch index file
    :param es: ElasticSearch object
    :param term: Term (Entity) to search
    :return: str
    """
    res = es.count(index=index_name, body={
        "query": {
            "match": {
                "text": {
                    "query": term,
                    "operator": "and"
                }
            }
        }
    })
    return res['count']