I am building an application using Spring boot and elasticsearch (& spring-data-elasticsearch).
I have an entity User that contains a list of regions (i.e each user is responsible for a set of regions).
I have another entity Report that is associated to region (i.e each report has a region)
I want to create indices of report for each user. So that each index contains only the reports of the regions that the user is responsible for.
In this way, when the user search for a report, the search is applied only in his index.
Besides, these indices has to be dynamic (i.e updates if the regions of the user are changed, or new reports are added).
How can I achieve this? Thank you for your help