Client.setTimeout(millis) does not seem to work ( unlike ActionFuture.actionGet(millis) )

Hi, our cluster has been experiencing some query timeouts which we
originally attributed to GC issues. We resolved those but we still have

Question 1: We increased the timeout value in the search builder's action
future. We did this by setting the future task's timeout value as shown
below. Obviously this is the client side setting. We also tried to set the
query side timeout but it does not seem to work.

I've pasted the example unit test code. Is this a known issue or are I
doing something wrong?

Question 2: When a ElasticsearchTimeoutException is thrown it does not
report which shard failed or have any detail unlike the SearchResponse.
Isn't that a little weird that the SearchResponse can report specific shard
timeouts but the ElasticsearchTimeoutException cannot?


public void testSearchTimeoutReporting() {
    Settings settings = ImmutableSettings.builder()

.put(GroovyScriptEngineService.GROOVY_SCRIPT_SANDBOX_ENABLED, "true")
.put("script.disable_dynamic", "false")
.put("script.default_lang", "groovy")


    Node node = NodeBuilder.nodeBuilder()
            //No automatic/magic loading from classpath.
    Client client = node.client();


            .prepareIndex("test", "type", "1").setSource("field", 


    try {

return true;")))
} catch (ElasticsearchTimeoutException e) {

Map<String, String> buildSettings() {
Map<String, String> nodeSettings = new HashMap<>();
nodeSettings.put("gateway.type", "none");
nodeSettings.put("", "node-" +
nodeSettings.put("node.master", "true");
nodeSettings.put("", UUID.randomUUID().toString());
nodeSettings.put("", "true");
nodeSettings.put("node.local", "true");
nodeSettings.put("", "false");
nodeSettings.put("http.enabled", "false");

    nodeSettings.put("", "memory");
    nodeSettings.put("", "true");
    nodeSettings.put("index.gateway.type", "none");
    nodeSettings.put("index.number_of_shards", "1");
    nodeSettings.put("index.number_of_replicas", "0");

    nodeSettings.put("", "build/data");

    //don't auto create the index
    nodeSettings.put("action.auto_create_index", "false");

    return nodeSettings;

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit