Thursday, January 29, 2015

SharePoint 2013 : Error ‘Not able to connect to search service to retrieve valid settings’ when launching Query Builder

שלום חברים,
היום נתקלתי בבעיה כשניסיתי להגדיר Result Source בממשק הניהול של שירות החיפוש.
כשלחצתי על הפקד שמציג את ה-Query Builder נפתח ה-Dialog  והופיעה בו השגיאה הבאה :
"Not able to connect to search service to retrieve valid settings"



יש שתיי אפשרויות שאני מכיר לבעיה :
1.       אין לי הרשאות Admin לשירות החיפוש.
2.       השירות אינו מחובר ל-Web Application של ה-Central Admin (או כל Web Application אחר)
כדי לבדוק אם יש הרשאות Admin בצע את הצעדים הבאים :
1.       נווט אל ' ניהול יישומים - ניהול יישומי שירות '
2.       בחר בשורת שירות החיפוש  (לא ללחוץ על שם השירות , פשוט בחר את השורה )
3.       בחר בכפתור ' המנהלים ' כדי לגשת לתיבת הדו-שיח שבו אתה יכול להוסיף מנהלי שירות יישום
4.       הוסף את המשתמש שצריך גישה לבונת השאילתה ותן לו שליטה מלאה
5.       לחץ על לחצן אישור.

כדי לעשות את הפעולה בעזרת PowerShell העתק את הקטע קוד :

$principal = New-SPClaimsPrincipal "<domain>\<user>" -IdentityType WindowsSamAccountName
$ssa = Get-SPEnterpriseSearchServiceApplication
$security = Get-SPServiceApplicationSecurity $ssa –Admin
Grant-SPObjectSecurity $security $principal "Full Control"
Set-SPServiceApplicationSecurity $spapp $security –Admin


כדי לבדוק האם השירות מחובר ל-Web Application בצע את הצעדים הבאים :
1.       נווט אל ' ניהול יישומים - ניהול האינטרנט ' (Application Management è Manage Web Applications) 
2.       בחר את שורת יישום האינטרנט של הניהול המרכזי 
3.       פתח את הדו-שיח חיבורי שירות בסרט התפריט (Ribbon) 
4.       ודא כי שירות החיפוש יישומי Proxy של יישום שירות חיפוש שלך מסומן, סמן במידת הצורך.

אם אתם מקבלים עכשיו שגיאה 'The Search display templates are not present on this site collection ' כשאתם פותחים את ה-Query Builder  אז אתם צריכים להפעיל את תכונת אוסף אתרים המקבילה באוסף אתרי הניהול המרכזי "Search Server Web Parts and Templates" באתר הניהול המרכזי.
 
לי זה פתר את הבעיה, מקווה שגם לכם J 
 
בהצלחה !
רון נס.


====================================================================================================================================================================================================================================


Hello friends,
Today I went to a problem when I tried to set the management interface Source Result of search service.
When I clicked on the control that displays the Query Builder and opened the Dialog I got  the following error:
"Not able to connect to search service to retrieve valid settings"



There are two options that cause the problem:
1. I do not have admin privileges on the search service.
2. The service is not connected to the Web Application of the Central Admin (or any other web application)

To check for admin permissions follow these steps:
1.  Navigate to the Application Management – Manage Service Applications
2.  Select the search service line (do not click on the name of the service, simply select the line(
3.  Select the button 'Administrators' to access the dialog box where you can add an application service managers
4.  Add the user needs access and give it full control
5.  Click the OK button.

To do this operation with PowerShell Copy the code section:

$ principal = New-SPClaimsPrincipal "<domain> \ <user>" -IdentityType WindowsSamAccountName
$ ssa = Get-SPEnterpriseSearchServiceApplication
$ security = Get-SPServiceApplicationSecurity $ ssa -Admin
Grant-SPObjectSecurity $ security $ principal "Full Control"
Set-SPServiceApplicationSecurity $ spapp $ security -Admin


To see if the service is connected to the Web Application follow these steps:
1.  Navigate to Application Management è Manage Web Applications
2.  Select the Web application of Central Administration
3. Click on 'Service Connections'  (Ribbon)
4. Make sure that the search service application proxy applications Your search service selected, select if necessary.

Now if you get an error " The Search display templates are not present on this site collection" , when you open the Query Builder you will  need to Activate the feature in  Central Administration site collection Settings named : " Search Server Web Parts and Templates".

For me it solved the problem, hope for you too J

Good luck!
Ron Ness.