Using elasticearch client for nodejs v7.5.2:
Adding a timeout to the query body like { "timeout": "1s" }
eventually times out long requests but it takes far longer than 1 second for the query to actually timeout.
In reality the query can run for more like 10 - 20 seconds before timing out. Is this timeout parameter not exactly enforced? Is there a better way to kill long running queries?