Wednesday, December 10, 2014

SharePoint 2013 Search: Error Launching Query Builder - RESOLVED

When attempting to launch the query builder when creating a new Content Source or Result Source via Central Admin you receive an error as follows:

Error: Not able to connect to search service to retrieve valid settings.

You need administrator rights to the Search Service Application - even if you are a farm administrator. (I just recently encountered this issue but thought it worked before - I am thinking that recent patches and updates plugged a security hole).

Solution Implementation - PowerShell
You can solve this easily by running the following PowerShell script with your account name:

$principal = New-SPClaimsPrincipal "DOMAIN\USERNAME" -IdentityType WindowsSamAccountName

$spapp = Get-SPEnterpriseSearchServiceApplication

$security = Get-SPServiceApplicationSecurity $spapp –Admin

Grant-SPObjectSecurity $security $principal "Full Control"

Set-SPServiceApplicationSecurity $spapp $security –Admin 

Solution Implementation - Central Admin
You may also solve this via Central Admin.

From Application Management, click on the Manage service applications link under the Service Applications section:

Scroll down to your Search Service Application and select it:

On the SERVICE APPLICATIONS top ribbon, click the Administrators button:

In the Administrators dialog, enter the account that needs permissions and click the Add button:

Select the account in the list and grant Full Control:

Click OK.

The Query Builder dialog will now launch properly without any trouble.

Matched Content