> ## Documentation Index
> Fetch the complete documentation index at: https://forest-chore-open-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Another example

For the purpose of this example let's say we have an `activity-logs` index in Elasticsearch with the following mapping.

## 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`](https://docs.forestadmin.com/woodshop/how-tos/create-a-smart-collection-with-elasticsearch/elasticsearch-service-utils) that handles all the logic to connect with your Elasticsearch data.

## Implementing the GET (all records with the search)

Another way to search through related data is to implement your own search logic.

<img src="https://mintcdn.com/forest-chore-open-api/l9oWVTFSA2iV8NAX/images/legacy/javascript-agents/image%20(483).png?fit=max&auto=format&n=l9oWVTFSA2iV8NAX&q=85&s=bb8ded0936dfb0c66107102971ae2d1b" alt="" width="2344" height="259" data-path="images/legacy/javascript-agents/image (483).png" />
