SharePoint does not return any search results

If you've ever configured SharePoint search in 2007 or 2010 then you may have come across this nasty gotcha.

In the SharePoint 2010 world your results would look like this! Nothing! But you know your search engine crawls correctly because you've seen it work and there are no errors in the log!

The reason why this happens is the Default URL is not the one used in the Search crawl. If you don't have this configured correctly then you'll get zero results returned. Not only that but you will see some very weird happenings. When I was playing around trying to understand the problem I did a search and frustratingly got no results so I decided to log in as a different user, and then I saw the results of the search! Wow, that was just silly, so I did another search, thinking it would now work. But no it did not. OK, I thought I would switch back to the previous user again, and guess what! Yes, I saw the results again. But then searching failed if I tried another search. It really stumped me to think that the only way to see search results was to do a search and then log in as a different users. That's what I mean about weird stuff.

The Default URL in this Alternate Access Mapping is used in the Search Configuration. So just following the configuration below is all you need to get results.

 

This is the Search Service Configuration. Putting it all together will now allow your search to work without even running a crawl! Brilliant. So I thought it would be good to blog about my experience so that others could save their sanity when I almost lost mine...Laughing

 

Comments are closed