Nested Array Problem

Hi Team,

We have groups on article like this

[[Group1, Group2], [Group3, Group4]]

Suppose we have 3 users and groups of these users are like below
User 1 Group [Group1, Group4]
User 2 Group [Group1, Group2]
User 3 Group [Group1, Group4, Group 5]

the above document is only visible for user 1.

The user group needs to exist exist on each subset.

Please provide a solution for this we are using elastic 5.6.16

I'm not going to answer to your exact question, but please do not use an unsafe version which is that old.
At least use 7.17.latest or 8.15.0.

Any possiblity that we can achive this in elastic 5.6?

You need to provide a full example of the dataset, what you would like...

Like a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Have a look at the Elastic Stack and Solutions Help · Forums and Slack | Elastic page. It contains also lot of useful information on how to ask for help.

Please make it run within Elastic 8.15. If we highlight a solution with this version, you can then convert it to Elastic 5.x although I highly discourage you doing so.