I want to check SPWeb reference if it is a search site. How can i do this by code.
FYI, this list is computed by using this Powershell command :
You have to take into consideration that a "search" site is only a web site where the related web parts are put on pages. A search site can be customized to remove the search, and an another kind of web can add the web parts to be able to search
Where site is a SPWeb should get you all the OOTB search templates (as a conditional of course). I used this code in a site branding project to set my custom search master page instead of the other custom master page.