none
Search says publishing site is of type document RRS feed

  • Question

  • I am running SharePoint Server 2007 standard with SP1, Infrastructure update and the latest cummulative roll-up patches.

    Search is incorrectly identifying publishing sites as documents.    Team sites are properly being returned as sites.

    I want to use a core search results web part with the following fixed query to return a list of all sites / site collections a user has permissions to access:

    site:mysite.com contentclass:sts_site contentclass:sts_web

    But since the publishing sites are showing up as a result type of document this is not working.

    Any ideas?

    Friday, October 24, 2008 8:29 PM

All replies

  • I ended up dropping the out of the box core search results and instead created a custom web part to accomplish what I was hoping to do.  This wasn't really do to the issue listed above but because I needed to add some additional functionality.    My web part uses the search web service and passes in the query string shown below to get the results.   This returns a nice list of SharePoint sites that are security trimmed to the logged in user.   As you can see the key I was missing was contentClass='sts_listitem_850'.   That helped get everything I needed for creating a personalized site directory listing.

    string

     

    query = "<QueryPacket xmlns =\"urn:Microsoft.Search.Query\" Revision =\"1000\"><Query><Context><QueryText language =\"en-US\" type =\"MSSQLFT\">SELECT Title, url, contentclass FROM SCOPE() where (ContentClass ='sts_web' or ContentClass ='sts_site' or contentClass ='sts_listitem_850') and site ='" + theSite + "' and isDocument =0</QueryText></Context><Range><StartAt>1</StartAt><Count>1000</Count></Range></Query></QueryPacket>";

    Tuesday, January 12, 2010 9:31 PM