This is an old issue I thought this was a bug in an specific environment after reading a couple of blogs it has made me think again...
The issue is that SharePoint site collections and sites are not correctly picked up by the search index. All the content is indexed but the sites themselves are not associated to the correct contentclass. Prior to SP2 the site collections (SPSite's) are listed in the index under the contentclass:STS_Site and the sites (SPWeb's) are contentclass:STS_Web. The following people seem to have come across this issue and assumed it was just a limitation. I think it was a bug introduced sometime during IU and SP2:
- TechNet Forum post on the issue
- Daniel McPherson's blog entry is not about the issue but he mentions it in the first paragraph
The situation that I have observed to exhibit this 'bug' is:
- a site collection or site is based on a publishing template (can be built-in e.g. collaboration portal or custom site template)
- SharePoint 2007 with updates post Infrastructure Update - in my situation it was applying SP2 but it might have been one of the culmlative updates after IU
- A search pre-SP2 using contentclass:STS_Site as a filter will list all site collections including those based on publishing templates, contentclass:STS_Web will list all sites based on publishing templates
- A search post-SP2 using contentclass filtyer as above will return only site collections/sites using non-publishing templates. All other content is availble e.g. documents, lists
Has anyone else come across this?
UPDATE 08/05/10: I have been doing some further testing and initial results look like if you upgrade the problematic site to 2010 then the behavior reverts back to how it should be. i.e. A search with "contentclass:STS_Web" or "contentclass:STS_Site" returns the webs or sites respectively.
UPDATE 02/06/10: As I mentioned above an upgrade to SharePoint 2010 will fix the issue (at least make the STS_Site and STS_Web results appear again) but there is still no fix for 2007. I recently applied the April 2010 CU to a test farm, reset the search index and recrawled and still the results are missing sites and webs from publishing sites. No fix...
Yet another person is also reporting this error in the MSDN forums and the moderator comfirmed the behavior/issue.
UPDATE 17/06/10: I am close to getting a definitive yes from MS support that this is a reproducible bug. Stay tuned...