diff --git a/quickwit/quickwit-search/src/lib.rs b/quickwit/quickwit-search/src/lib.rs index b5e7a881c08..6fe6d61de4c 100644 --- a/quickwit/quickwit-search/src/lib.rs +++ b/quickwit/quickwit-search/src/lib.rs @@ -97,7 +97,8 @@ pub type SearcherPool = Pool; fn search_thread_pool() -> &'static ThreadPool { static SEARCH_THREAD_POOL: OnceLock = OnceLock::new(); - SEARCH_THREAD_POOL.get_or_init(|| ThreadPool::new("search", None)) + let search_thread_pool_size = quickwit_common::get_from_env_opt("QW_SEARCH_THREAD_POOL_SIZE"); + SEARCH_THREAD_POOL.get_or_init(|| ThreadPool::new("search", search_thread_pool_size)) } /// GlobalDocAddress serves as a hit address.