I have the below query template in my role:
{"template":{"source":{"match":{"role.keyword","{{_user.roles}}"}}}}
role
in that example is an array on a document. _user.roles
is obviously an array.
When I log in as a user I see Discover: [script] failed to parse field [source]
in Kibana which I assume to be an issue with the above template. Is what I'm trying to achieve possible which is the document can only be visible if one of the user roles matches any of the roles property on the document