Limit number of thread in ThreadPool while creating TransportClient in elasticsearch

I'm creating a TransportClient instance in elasticsearch. Below is the code
for the same. The issue is I'm trying to lower the number of threads
spawned with the threadpool that TransportClient initiates.

public static TransportClient getTransportClient(String ip, int port) {

ImmutableSettings.Builder settings = ImmutableSettings
        .settingsBuilder();
settings.put("cluster.name", "elasticsearch");
settings.put("threadpool.bulk.type",  "fixed");
settings.put("threadpool.bulk.size" ,5);
settings.put("threadpool.bulk.queue_size", 5);
settings.put("threadpool.index.type" , "fixed");
settings.put("threadpool.index.size" , 5);
settings.put("threadpool.index.queue_size" , 10);
settings.put("threadpool.search.type",  "fixed");
settings.put("threadpool.search.size" ,5);
settings.put("threadpool.search.queue_size", 5);
settings.build();


TransportClient instance = new TransportClient(settings)
        .addTransportAddress(new InetSocketTransportAddress(ip, port));


return instance;

}

But what ever settings I use my elasticsearch always initialing the
threadpool with 12 threads. Guess that is the 4 time of CPU while
calculating the threadpool size.

Please let me know what is the configuration to get the desirable threads.

Thanks,
Bagui

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fbd03973-3706-4b59-a524-31a94d305c42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.