You can pass get variable SearchContentClassID to content/advancedsearch or if you want control search from the template you need to change INI setting in
Then you can use the "class_id" attribute of the fetch(content, search) function in template. Also make sure that class_id is an integer not at string like "folder".