Search not returning results when using “This Site” option

 

I recently dealt with an issue involving MOSS 2007 Search that I could find very little information on when searching the web. The ones of us that have been working with SharePoint for a while and have fought our battles getting Search to work in complex environments would probably know the things to check, but the folks that haven’t had to deal with Search issues (yet) might not know how to troubleshoot. So I decided to do a little overview and explain how I solved this client’s problem.

This happened on a site with numerous subsites. It was in its own web application and site collection. When using the “All Sites” option from the search dropdown, results were being returned. When using “This Site” option from the dropdown, Search was not returning any results even though documents with the desired text were contained within the site. This indicated that this particular site collection was not being crawled and indexed.

search screen shot 

For this example, we will assume Search is working as expected on everything except this site collection and its sites/subsites using “This Site” option from the dropdown. If Search isn’t working at all, that’s a whole different topic that there are many good books about! If you don’t have one, I recommend getting one so that you will have a resource that explains everything about search. The problem encountered by this client was a simple one compared to some I’ve seen. Maybe that’s why I didn’t find anything about it when I searched the web…….hmmm…..

The things I checked were:

  1. Had a content source been set up in Central Admin? To check, open Central Admin, click on your SSP, then under Search select Search Administration > Content Sources. Check to see if a content source for the site collection has been set up and that it is scheduled to crawl. If not, click on New Content Source and fill in the required information. In the case I was working on, there was a content source and a crawl had been attempted but the crawl log showed errors saying the default access account did not have permission on the site. 
  2. Is there a crawl rule for the site?  If so, was it showing the proper authentication account? In my example there was a crawl rule and it was showing the correct account for access, so why did the logs say the account didn’t have access? 
  3. Back to the Site….go to Site Actions > Site Settings > Modify All Site Settings. Check all the settings related to Search. Search settings had “use custom scope” selected and named the scope in Central Admin. Search Scopes showed the scope name, but had zero items as being indexed. The problem was under Search Visibility. The first question on this setting is “Allow this web to appear in search results”. “No” was selected. That’s why the search account didn’t have access to crawl it! I changed the option to “Yes” and clicked ok.

After changing this option, I returned to Central Admin to the search scope and started a full crawl of the site collection. After a few minutes, the log was showing items being indexed. 20k items later (less than an hour) the crawl was complete. I verified search using “This Site” was working by going back to the site and selecting this option from the dropdown. A spot check of the subsites showed that results were being returned from within the designated site as desired.

Next time I think I’ll check to make sure the “No” isn’t selected under Search Visibility…might save myself some time. :)

3 Responses

  1. Had this issue before.

  2. I am experiencing a similar issue however when I run the search using the All Sites scope I get results. For some reason the This Site and This List options are not proving any results. Any ideas?

    • There is no simple answer to this one. There are many reasons searching through “this site” and “this list” might fail. I would recommend searching online to see some of the possibilites and checking each. You may need to engage Microsoft to help you solve the issue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.