> ## Documentation Index
> Fetch the complete documentation index at: https://forest-docs-mcp-server-agent-url.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-docs-mcp-server-agent-url/Po8IL9hr9qf_cY73/images/legacy/javascript-agents/image%20(483).png?fit=max&auto=format&n=Po8IL9hr9qf_cY73&q=85&s=2e5b53fe5a621befc5a8dfd36c68a8ab" alt="" width="2344" height="259" data-path="images/legacy/javascript-agents/image (483).png" />
