Grant privileges to specific documents, Kibana Role

Hi Im currently using this query for privileges to specifics documents

{
"terms":{
"host.keyword":["meli","cmai","moja"]
}
}

But now I need to grant privileges to the documents that has a specific field "metrics" along with the above query

In words will be something like this:

grant privileges to the documents which host are "meli","cmai","moja" and that the field "metric" exist

how can I mix this two conditions to filter the documents?

Thanks!

Does https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html help?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.