Not able to view result while building Search Query


Hello SharePointers ;),

Here is another quick finding which I just thought should be shared to save someone precious time. If you are dealing with SharePoint 2013 search and Result sources, you must try to test the query template before saving it. If you are not able to see any results instead just a red error saying below text don’t get scared I have quick solution for you.

“The Search display templates are not present on this site collection. To add them, you need to activate the “Search Server Web Parts and Templates” feature on the Site Collection Features page.

Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.

Template ‘~sitecollection/_Catalogs/masterpage/DisplayTemplates/System/Control_QueryBuilderPreview.js’ not found or has sytax errors. (Load Template: ) ”

Search_Error

You must get frustrated because your search is properly configured, its crawling the data and you are able to see results while searching.  After looking at what was missing I found that in fact there was a feature missing on the Central Administration site collection. The feature is called Search WebParts.

But its not so quick that you just navigate to Site collection feature and activate it. As this feature is present at central admin site collection level so it requires extra privileges to activate it. To fix the problem, simply run the following command in an elevated SharePoint Management Shell:

Enable-SPFeature SearchWebParts -url http://<central admin url>

Bingo!! Just, re-open the “build your query” page, and everything should work properly!

Search_Error

Hope that post was able to help you. Please press like button it that saved your time.

Happy SharePointing 🙂

SharePoint 2013: The search service is not able to connect to the machine that hosts the administration component.Verify that the administration component.


Hi,

Issue:

The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component ‘GUID’ in search application ‘Search Service Application’ is in a good state and try again. In Farm Search Administration page when click on “Modify Topology” get error “An unhandled exception occurred in the user interface.Exception Information: Exception has been thrown by the target of an”

Cause: Search is not able to connect is because of name reasons, in this article I am explaining various the solution of this issue.

Solutions: Please find the below solutions, That one of it can resolve the issue.

Solution 1:

In the end it turns out to be that the application pool that hosts the search service application somehow doesn’t have the correct access.
You can simply change the application pool to use SharePoint Web Services System for search service applications and check.
1. Click on Start > Run > Type Inetmgr > Click OK

0094

 

 

 

 

 

 

 

 

 

 

 

2.  In IIS > Expand server > Expand sites > Expand “SharePoint Web Services”
0096

3. Now check all the GUID 1 by 1 in content view unless you find searchadmin.svc and searchservice.svc

0095

4. Right click GUID go to advance settings

0097

5. Change the application to “SharePoint Web Services” > Click OK
0098

Solution 2: Enable the timer job and do IIS reset

1. Run below PS command to know the status of timer job
Get-SPTimerJob job-application-server-admin-service
Result ==> Is Disabled: True

  1. Run below PS command to enable the service.
    Enable-SPTimerJob job-application-server-admin-service
    Result ==> IsDisabled: False
  2. Do Net Stop sptimerv4
  3. Do Net start sptimerv4
  4. DO iisreset

Solution 3:Ensure the account has full control permissions on the Search service application and IIS account used by this service application
Follow below steps
1. Open Central Admin  > Select Security > Select “Configure service accounts”
0092

2. Select the search service application

0093

3.   For “select account for this component” Select a account which has full permission

Hope that helps. Happy SharePointing 🙂

Search Service Application stuck on Starting


Hi Guys,

I was facing a very strange issue since two three days. I just wasted lot of my time while solving it. After experiencing SharePoint 2013 service architecture, I was under the impression that MS have modified SharePoint this time that one will never face any issue while configuring the service applications.

But I was wrong, I am talking about the Search service application here. If you are lucky then it may be the case that you will not see this issue but I wasn’t actually explored the reason behind the issue.

Issue Description:

  1. “Unable to retrieve topology component health states. This may be because the admin component is not up and running.”
  2. The default content source “Local SharePoint Sites” is inconsistent. It doesn’t always appear after creation of Search, sometimes with start addresses of existing web apps listed already, other times not.
  3. Starting a full crawl results in stuck in ‘starting’.

                       ssa-bad

Tried Solutions:

  1.  Installed all hotfixes by following this post.
  2. Configure the Noderunner by following this post.

Solution:

I got disappointment after trying above solutions. Then one of my colleague helped my out finding the worked solution. Then I released that we are the same .Net developers having dependency on SQL server. I ran following script to fix the database issues and that worked for me. I am sharing queries as below:

EXEC sp_resetstatus ‘WSS_Content’
ALTER DATABASE WSS_Content SET EMERGENCY
DBCC checkdb(‘WSS_Content’)
ALTER DATABASE WSS_Content SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‘WSS_Content’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE [WSS_Content]  SET MULTI_USER

NOTE: Please change the name of the database. By default sharepoint creates the database with the name Wss_Content but make sure that you have this database in the SQL server. Other way to find the content database is navigate to Central Admin > Application management > Content Database.

I would like to mention one more important point here that you should execute these queries one after another. Because It may hours to fix the content database depending upon the size of the database.

Note: Don’t Execute commands in one shot

You defiantly will get success like me 🙂

ssa-good

Happy Sharepointing 🙂

Creating and configuring Search service application


SP 2010 provides all the basic search functionalists like MOSS 2007 search was providing. Along with default features it also facilitates end user with few interesting features. With batter enhancements in search query, new search model enables end users to create and run more effective search queries. It also enables users to search the enterprise from the Windows 7 desktop. Below are few new features listed:

  • Boolean query syntax for free-text queries and for property queries
  • Prefix matching for search keywords and document properties
  • Suggestions while typing search queries
  • Suggestions after users run queries
  • Federated search connectors for searching the enterprise from Windows 7

Search results are also restructured to use refinement panel, improved in people search area, enhanced to display and filter only relevant results.

In this post, I will start explaining from scratch to create/configure search service application and later on we discuss how we can configure custom scopes in enterprise search site.

Creating Search service application:

Verify that the user account that is performing this procedure is a member of the Farm Administrators group for the farm for which you want to create the service application.

On the Central Administration Home page, in the Application Management section, click Manage service applications.

On the Manage Service Applications page, on the ribbon, click New, and then click Search Service Application. If New link is not clickable then you must open the browser with option “Run as administrator”.

         

On the Create New Search Service Application page, accept the default value for Name, or type in a new name for the Search service application.

Name: Enter a name for your Service Application.                                                  

FAST Service Application: Select “None”

Search Service Account: Click on Register new managed account and ensure your domain account has already been provisioned in Active Directory.  I have created a separate search account; e.g. DOMAIN\sp_search.

In the Application Pool for Search Admin Web Servicesection, do the following:

Select the Create new application pool option, and then type a name for the application pool in the Application pool name text box.

In the Select a security account for this application pool section, select the Configurable option, and then select the account that you created to run the application pool for the Search Admin Web Service from the list.

In the Application Pool for Search Query and Site Settings Web Servicesection, do the following:

Choose the Create new application pool option, and then type a name for the application pool in the Application pool name text box.

In the Select a security account for this application pool section, select the Configurable option, and then select the account that you created to run the application pool for the Search Query and Site Settings Web Service from the list.

Click OK.

After the Search service application has been created, the next step is to configure it.

Configure the Search service application

Open SharePoint 2010 Central Administration.

Select Managed service applications under Application Management.

On the Services Applications page, select the Search Service Application

You configure a Search service application on the Search Administration page for that service application. Use the following procedure to navigate to the Search Administration page for a particular Search service application.

On the Search Administration page, configure the following settings as described in the following sections:

  • Default content access account
  • Contact email address
  • Content sources

Use the following procedure to specify the default content access account.

To specify the default content access account

  1. On the Search Administration page, in the System Status section, click the link in the Default content access account row.
  2. In the Default Content Access Account dialog box, in the Account box, type the account that you created for content access in the form domain\user name.
  3. Type the password for this account in the Password and Confirm Password box
  4. Click OK.

To specify the contact e-mail address

On the Search Administration page, in the System Status section, click the link for the Contact e-mail address.

  1. In the Search Email Setting dialog box, in the E-mail Address box, type the e-mail address that you want to appear in the logs of servers that are crawled by the search system.
  2. Click OK.                                                             

Configuring content sources:
Crawling requires at least one content source. A content source called Local SharePoint sites is created automatically during installation and is automatically configured for crawling all of the SharePoint sites in the server farm.

On the Search Administration Page, in the Crawling section, click Content Sources.

As was the case with SharePoint 2007, our Local SharePoint sites will be detected by default, albeit without a crawl schedule.

Check to see that your Start Addresses are located within your content source via editing the content source from the drop down menu.  These includes all SharePoint Web Applications and the sps3 “User Profiles” address.


You can easily create your crawl schedule by clicking on Local SharePoint sites and scrolling down to Crawl Schedules.

Once your crawl has completed, you should confirm that there were no errors encountered during the initial crawl.  Usually any errors noted are most likely due to incorrect permission assignments.

For more information, see Add, edit, or delete a content source (SharePoint Server 2010).

Also if one needs to configure the external content sources then have a look on the post Configuring external content sources.

Other confrontational settings:

Confirming Permissions

In order to perform the people search, it is required that newly configured search application administrator must have permissions on the user profile service application. Select Managed service applications under Application Management.

Click on User Profiles service. Just highlight the User Profiles and select Administrators from the ribbon.

Our newly provisioned search account should have “Retrieve People Data for Search Crawlers” selected as a permission.

We will also confirm that our sp_search account has the necessary “Read” permissions against the Web Applications being crawled.

Navigate to Central Administration > Application Management > Manage Web Applications.  Again, highlight the Web Application in question and from the ribbon select User Policy.

Ensure that the Search Crawling Account is set to the sp_search domain account.

With this step, search application is now fully configured. In the next blog I will describe how to create the enterprise search site to consume this application for displaying the results. Also we will see how we can create some custom scopes.

Thanks for your time :)..