Overview
Certain individuals in your organization may not show up in searches using the Employee Directory. However, when the same search is performed using the search function on the home page, they show up in the search results.
Solution
This issue with the Employee Directory web part is caused by the Result Source that this is based on. It may occur when a Result Source is modified from its default version, leading to some differences in search criteria. Thus, a Web Part using such a result source gives different results from one using a default Result Source. Follow the steps outlined below to solve this issue:
- Navigate to the Employee Directory Web Part that is not displaying the employee names in the search results. Click on the Cog Icon on the top right of the page and click on Edit Page:
- Click on the down arrow next to the Employee Directory Web Part and click on Edit Web Part:
- In the window pane that appears on the right, note the entry that is under the Result Source Field:
In this example, it is the Employee Directory. It is possible that this Result Source may have been modified, resulting in search criteria that yield different results than expected. To solve this, you can compare the search criteria for the query for this result source with a similar Result Source (in this example, it could be Employee Directory by Relevance) and check for differences in the search criteria. - Navigate to the Cog Icon on the top right again and navigate to the Site Settings Option:
- On the subsequent page, under Site Collection Administration, click on Go to top level site settings:
- Then click on Search Result Sources:
- On the subsequent page, under the heading Defined for this site collection, click on the Result Source you noted in step 3, e.g. Employee Directory:
- Under the Query Transform section, click on Launch Query Builder:
- Once the Query Builder Opens, note down the settings in the BASICS and SORTING tabs of the query builder for this result source:
Repeat steps 4-10 for a similar, default Result Source that has not been modified (e.g. Employee Directory by Relevance), and compare the two. You can note the differences between the two Result Sources, and update the query for the modified result source to match that of the default one, in order to resolve this issue.
Note: If you are unable to launch the query builder for this step because it is greyed out, move to step 13. - To test whether these changes solve your issue, navigate to the Test tab and click on Show more:
- Enter a search term to search for the employees that were previously not appearing in the search results, and click on Test Query. Verify that they now appear in the search results:
- If these steps do not solve your issue, please contact support.
- If you are unable to select the Launch Query Builder Option in Step 9, a workaround solution is to change the Result Source for that web part to a default, but similar one. Go back to Step 3, and change the Result Source field. In this example, the Employee Directory By Relevance Result Source can be used to substitute the faulty Employee Directory Result Source:
Perform steps 4-8 again (in Step 7, click on the newly selected Result Source instead). - You will now be able to click on the Launch Query Builder Option. Navigate to the Sorting tab. By default, the sort order will not be configured and you will have to do so:
- Select a Sort property and Order, e.g. PreferredName and Ascending:
- Navigate to the Test tab and click on Show more:
- Enter a search term to search for the employees that were previously not appearing in the search results, and click on Test Query. Verify that they now appear in the search results:
- If these steps do not solve your issue, please contact support.