November 30, 2015

SharePoint Multi-Tenancy: Search returns no hits from tenant site

Problem

After setting up on-premises SharePoint 2013 in multi-tenancy mode, and configuring all Service Applications, everything else was working fine, but there was no search results being returned from the tenant site collections.

I could see from SharePoint search logs that the site contents were crawled properly, but even a broad search query such as Size>0 didn’t return any hits.

Thoughts

I had to tweak AutoSPInstaller scripts to enable creating different Service Applications using the -Partitioned or -PartitionMode parameter, and I had missed to set -Partitioned parameter for the Search Service Application Proxy.

I got to the bottom of this by looking at the Properties of the Proxy using PowerShell like this:

PS C:\AutoSPInstaller> Get-SPEnterpriseSearchServiceApplicationProxy

DisplayName          TypeName             Id
-----------          --------             --                                 
Search Service Ap... Search Service Ap... c54d9470-714a-46ff-983c-33422d466a4c

PS C:\AutoSPInstaller> $sp = Get-SPEnterpriseSearchServiceApplicationProxy c54d9470-714a-46ff-983c-33422d466a4c

PS C:\AutoSPInstaller> $sp.Properties

DisplayName                    Value                       
----                           -----
Microsoft.Office.Server.Uti... UnPartitioned

Note the “Unpartitioned”, it should say “UniquePartitionPerSubscription”.

Solution

  1. Remove Search Service Application Proxy
  2. Create it using the -Partitioned parameter

2 comments: