Gets or sets the number of threads used for the search. The default value is Default, which means that the search will be performed using the number of threads equal to the number of processor cores (ProcessorCount).
The searches of an index that run at the same time share the threads. A search runs on the thread that calls it, and while fewer threads than this number are busy with the searches of the index, the index helps them with threads of its own: one search uses up to this number of threads, and searches that run at the same time use this number of threads together. When as many searches as this number run or more, every search runs on its own thread only. A search never waits for a free thread. A part of a search that is too small to gain from several threads, such as a search of a small index, runs on the thread of the search.
The value can be changed at any time. A search uses the value that is set when the search starts.
A value changed while an index uses these settings is saved in the index at once or, if the index performs an operation at that moment, when the operation is finished. A new index uses the settings with which it is created; an existing index that is opened uses the settings saved in it, which IndexSettings returns.