How to limit query time in elasticsearch?

You can pass a search “timeout” in the request body or in the uri request. If the search request times out before collecting all results, the partial results will be returned.

Here’s a uri request example for 10 seconds (units are in milliseconds):

http://localhost:9200/_search?timeout=10000

If you set the timeout low enough, the returned json will show “timed_out”:true.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)