Manual:$wgNamespacesToBeSearchedDefault

Details
The variable holds an array of namespaces, numbered from -1 (Special:) and not including -2 (direct-linked media) indicating which namespaces are enabled for searching by default. The array is indexed by the numeric namespace ID, and each index holds either 0 (don't search) or 1 (search this namespace).

Note that changing this value only affects newly created and anonymous users - it does not change the settings for existing users.

Default value
Note: Each version of MediaWiki only went as far as the maximum namespace existing at the time.

1.5.0 and above

 * See the |talk page for an explanation why simple listing of a new namespace may not work.

Here are the available namespace constants if you want to add further namespaces: NS_MEDIA NS_SPECIAL NS_MAIN NS_TALK NS_USER NS_USER_TALK NS_WIKIPEDIA NS_WIKIPEDIA_TALK NS_IMAGE NS_IMAGE_TALK NS_MEDIAWIKI NS_MEDIAWIKI_TALK NS_TEMPLATE NS_TEMPLATE_TALK NS_HELP NS_HELP_TALK NS_CATEGORY NS_CATEGORY_TALK

Prior to 1.5.0
The NS_ constants weren't used (possibly because they weren't defined) so numeric values were used instead:

Prior to 1.4.5
Prior to 1.4.5, namespaces 9 and 11 were also searched.