SharePoint 2010 Search is not working – no results

Scenario and investigation of the problem:

You created search service application and your search service is running correctly. Your crawl is indexing sites, you have many items in index. Your ‘All sites’ scope has many items.

Users get no results when searching for content. There is no error on a results page, just saying that there are no results. Users get correct results when searching for people.

You go to site settings >Search scopes and see that All Sites scope has ZERO items, unlike Central Administration.

You try to create a new scope to separate your site content, again, it show items in Central Admin but after scopes update, it still shows ZERO elements in site collection search scopes, scope status in READY.

There are no errors in Event Log.

There are no errors in ULS.

You try to create a new Search Service Application but you get same results.

Google has pointed me into right direction but it was really long process and many clues in between.

First important fact:

You should reconfigure your diagnostic logging to show Verbose for Search Service. you can restart SharePoint Timer Service to start a new log file

After I did that I get interesting log in ULS:

Query Processor                                 Unexpected       AuthzInitializeContextFromSid failed with 2. The querying user’s Active Directory object may be corrupted, invalid or inaccessible. Query results which require non-Claims Windows authorization will not be returned to this querying user. 

This has pointed me into the right direction to this thread

http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/2d903f8a-f74b-48e6-9b3e-b9461ae3fa5e

Also, this is really good stuff on Search service issue resolution:

http://www.cleverworkarounds.com/category/sharepoint/application-development/

And, at the very end, this is official technet KB:

http://support.microsoft.com/kb/2344518

So basically, this was fix:

1.Write and run a script:

$ssa = Get-SPEnterpriseSearchServiceApplication “<Your Search Service Application Name>”   #you find search service application name on a list of all service applications

$ssa

$ssa.SetProperty(“ForceClaimACLs“,1)

$ssa.GetProperty(“ForceClaimACLs”)

2.Run full crawl on all your data sources

3.Look at your site collection scopes – they should now have >ZERO count :) – search is working and returning results (yuppie!)

4.One glitch that I noticed – now in Search service application – View scopes, they show ZERO… hmmm… no idea why, before running this script situation was opposite… but search is now finally working for all users and this is what counts!!! Client is happy!!!

Now, why would this happen to you, providing your search was working, you remember it working correctly. Well, I did not find direct reason but it this particular setup, domain controller and all users in Active Directory were maintained by other company – service provider. I am only guessing that they may have changed service account policies, domain trust levels etc. In similar scenarion, the keyword to diagnosing it is AuthzInitializeContextFromSid

4 Responses to “SharePoint 2010 Search is not working – no results”

  1. Robert Graauw

    thank you very much.
    This worked like a charm.

    Reply
  2. Chris

    Thank you for this, worked perfectly and ended a 5 hours session of search-bugfixing! :)

    Best regards and happy coding,
    Chris

    Reply
  3. JamesQ

    Thank you so much!~ I got this away finally in behalf of you.

    Reply

Leave a Reply to Robert Graauw

Click here to cancel reply.