def _get_es_body(ace):
    """ Get ES body from ACE.

    Look into ACLEncoderMixin.stringify_acl for details on ace format.

    :param ace: Stringified ACL entry (ACE) to generate body for.
    :returns: ES request body as a dict with root key "query".
    """
    must = [{'term': {'_acl.action': ace['action']}}, {'term': {
        '_acl.principal': ace['principal']}}, {'term': {'_acl.permission':
        ace['permission']}}]
    body = {'query': {'filtered': {'filter': {'nested': {'filter': {'bool':
        {'must': must}}, 'path': '_acl'}}}}}
    return body
