Sunday, January 18, 2009

SharePoint : Search using « This Site » or “This List” scope returning no results

I met a problem with the Search scope on a MOSS 2007 farm the other day that I thought was worth blogging about.

On all the content sites of our farm, the “All Sites” scope worked as expected, but the “This Site” or “This List” search scopes wouldn’t return a single result.

There are several reasons that can explains this problem according to this technet forum thread (http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/906045d8-8782-4c39-be1b-7632f7239019/#page:1), in our case the problem was due to a difference between the Content Source defined for the crawl and the default zone defined in the Alternate Access mapping.

Our Alternate Access Mapping for this zone was defined as follow:

Private URL Zone Public URL
http://hostname Default http://hostname
http://intra.dnsname.com Intranet http://intra.dnsname.com

And we used http://intra.dnsname.com as the start address for the crawl.

We tried changing the content source start address from http://intra.dnsname.com to http://hostname, resetted the crawl content and launched a full crawl and that was it. The “This Site” and list scopes worked perfectly from then on.

That could have been it, except that this change caused another problem. Before this modification we had no trouble with links URL, I mean if I used http://intra.dnsname.com to reach the site, all the links in the pages would use this dns name, not the hostname. After the modification of the content source however, some search results would sometimes be presented with the hostname in the url instead of the dns name.

To solve that problem we changed the Alternate Acces Mapping configuration to:

Private URL Zone Public URL
http://hostname Default http://intra.dnsname.com
http://intra.dnsname.com Default http://intra.dnsname.com

Voila! The Site and List scopes are working and the URL are always based on the DNS name when someone uses the DNS name to reach to site.

By the way, you might find this article about Alternate Access Mapping very useful: http://blogs.msdn.com/sharepoint/archive/2007/03/06/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-1.aspx

11 comments:

Jerome said...

Thanks ! that solved my issue !

RoMie said...

I'm currently going through the same issue, my question to you is:
How did you make the "Private URL http://hostname" different then the
"Intranet http://intra.dnsname.com" in your AAM.

Joe said...

Romie, I might have made a mistake.

You might want to give this solution a try :
Private URL Zone Public URL
http://intra.dns.com Default http://intra.dnsname.com
http://hostname Intranet http://intra.dnsname.com

I will check latter on (too busy for the time being) and fix the post if necessary.

Strausy said...

Great post. Just what I needed.

Anonymous said...

I'm with Romie, doesn't matter what I try the internal URL and Public URL always match.

bob said...

Hi,
if you want also an anvanced list search you can use Infowise List Search which enable that.

http://www.infowisesolutions.com/product.aspx?id=ListSearch

Anonymous said...

To make Internal URL different from Public URL... Make first two Intranet zone entries with different addresses -> the second one becomes this: Internal_URL_given_for_the_latter, Zone_Intranet, Public_URL_given_for_the_first_entry.

Anonymous said...

Then delete the first Intranet entry having same Internal and Public URLs.

Anonymous said...

this was very informative i really apprecite it.
Rozeena

staygreenacademy said...

this was very useful for me.
Rozeena

Unknown said...

I spent two full days banging my head in the wall to solve it.
Thanks. this Solved my Problem in SharePoint 2013
however, I used the Public URL (http://intra.dnsname.com) as Start Address
not the internal (http://hostname).
it worked (I can see search results).