How to set the timeout for every search

Hello, how can I set the timeout for the searches? Sometimes the server takes too long to respond, way after the timeout of my webserver, so it has no sense that the ELK keeps working on that query

I have a single node Enterprisesearch and Elasticsearch with docker in AWS EC2

Thanks!

please refer Search your data | Elasticsearch Guide [7.16] | Elastic

Probably you can set the cluster-wide default timeout for all search requests using search.default_search_timeout .