Question about query timeout (both in URI and in query body)

Hello!

I have a question about the timeout, I hope someone can help me. I
tried to use query timeout, for example like this:

curl -XGET 'localhost:9200/_search' -d '{"timeout" : "10ms", "query": {"term" : { "_all" : "apple" }}}'

or

curl -XGET 'localhost:9200/_search?q=apple&timeout=10ms'

The above queries are run against 20 shards and each time the overall
time the query is executed is far above the provided timeout value,
even if we count 10ms * 20 shards where the total time would give
200ms and I sometimes see query execution time being longer than
1000ms.

What I'm wondering if I'm missing something how timeout works ? Can
anyone share some thoughts or experiences about timeout ?

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

--

This question is similar to
https://groups.google.com/forum/?fromgroups=#!searchin/elasticsearch/timeout$20not$20working/elasticsearch/AjpmlShg8jc/rn5oPMqecuUJ
which got no answers.

Is it the case that the timeout value applies only to the actual query
execution at Lucene level?

As in:

Thanks,
Otis

Search Analytics - Cloud Monitoring Tools & Services | Sematext
Performance Monitoring - Sematext Monitoring | Infrastructure Monitoring Service

On Friday, September 21, 2012 6:18:09 AM UTC-4, Rafał Kuć wrote:

Hello!

I have a question about the timeout, I hope someone can help me. I
tried to use query timeout, for example like this:

curl -XGET 'localhost:9200/_search' -d '{"timeout" : "10ms", "query":
{"term" : { "_all" : "apple" }}}'

or

curl -XGET 'localhost:9200/_search?q=apple&timeout=10ms'

The above queries are run against 20 shards and each time the overall
time the query is executed is far above the provided timeout value,
even if we count 10ms * 20 shards where the total time would give
200ms and I sometimes see query execution time being longer than
1000ms.

What I'm wondering if I'm missing something how timeout works ? Can
anyone share some thoughts or experiences about timeout ?

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
Elasticsearch

--