First, we declare the activity-logs collection in the forest/ directory.
In this Smart Collection, we want to display for each activity log its action, the label (in a field description), the related user that made the activity, the collectionId on which the activity was made and the date the activity was made by the user.
Implementing the GET (all records with a filter on related data)
This is a complex use case: How to handle filters on related data. We want to be able to filter using the user.mail field.
To accommodate you we already provide you a simple service ElasticsearchHelper that handles all the logic to connect with your Elasticseearch data.
Example of filter on related data
Implementing the GET (all records with the search)
Another way to search through related data is to implement your own search logic.