elasticsearch understanding threadpool
Inline answers
1. For search request: If my index has 2 shards, how many threads will it need?
for each Primary shard, ES creates an individual thread.
2. bulk/write request: If my index has 2 shards, how many threads will it need
Same as first answer
3.Does write & search request have dedicated threads? i.e no.of search request does not affect write threads/thread queue
Yes, they have their own thread pools. search pool is for For count/search/suggest operations. write thread pool for For single-document index/delete/update and bulk requests. More info on the same official link in the question.