What are Search Verticals
In SharePoint 2013 Search Vertical are displayed in the Search Navigation Web Part on Search Center. SharePoint 2013 provides us four Search Verticals OOTB; namely Everything, People, Conversation, and Videos. Each of these verticals is mapped to a specific page to display the results returned by the queries and when Search Users click on any of these verticals they are navigating to the respective mapped pages with the vertical they clicked on.
For example: Search Vertical Everything uses Results.aspx page to display the results returned by the query. In a similar fashion People vertical usesPeopleResults.aspx, Conversation vertical uses ConversationResults.aspx,Video vertical uses VideoResults.aspx.
All these pages used by the different Search Verticals can be located under Page Library on Search Center Site
Each of these vertical pages use the following four Web Parts to render results returned by the user queries:
- Refinement Web Part
- Search Box Web Part
- Search Navigation Web Part
- Search Results Web Part
I hope by now you have a fairly good idea on “What are Search Verticals?”
In this article we are going to create new a Search Vertical for our Search Center that will be showing all the documents (Only Documents) Authored or Co-Authored by me.
Business Scenario:
- Search must be able to show all the documents Authored or Co-Authored by me
- All the search results must be shown under different vertical on the Search Center
- Only documents must be included in the search results
Prerequisites:
- Search Service Application Instance must be created and configured
- Content Sources must be created as required
- Full Crawl must be executed once at least on each of the Content Source
- Search Center Site must be created & configured as required
On a similar line we can create our own Search Verticals.
We need to perform the following steps to get a new Search Vertical Up and Running.
- Create Result Sources (One per vertical)
- Create new Search Vertical page to display results
- Configure Search Navigation
We will start our journey by creating the required Result Source for the new search vertical
Go to Site Settings,
Go to Search >> Result Sources,
Create new Result Source by clicking New Result Source link,
Enter Name and Description.
Choose Local SharePoint as Protocol,
Click in Launch Query Builder Button to launch Query Builder screen where we can specify the relevant query for the Result Source,
Choose Property Filter as needed, based on the business scenario we have we will choose Property Filter as Author and Value as Name of the user who run the query then Property Filter as IsDocument and Value as 1.
Setting Document Property Filter to 1 is a must if you want to display only documents as the part of the search results for this newly created vertical.
Click Add property filter Button to add the properties to the Query Text.
Once we are done with configuring the Query we need to test the Query by clickingTest Query Button.
Search Result Preview Panel on the left which will display all the results returned by the query we just configured.
Click OK.
With this we are done with the creation of Result Source for the new Search Vertical.
Now we will create a new Search Vertical Page to display results retuned by the Result Source that we have just created.
Go to Site Contents
Go to Pages Library,
Click new item or Go to Files Tab >> New Document,
Choose Page Template to create a new Search Page.
Once the page is added, Edit the page,
Locate Search Results Web Part and edit its properties,
In Web Part Properties click on Change Query Button to launch a query builder,
Choose My Documents Result Source from Select a query Dropdown box,
Click Test Query Button to test the query translated by the Result Source selected under Select a query,
Search Result Preview Panel on the left will display all the results returned by the query we just configured.
With this we are done with creation a new Search Result Page.
It is time now to Configure Search Navigation to include new Search Vertical on the Search Center
Go to Site Settings,
Go to Search >> Search Settings.
Click on Add Link under Configure Search Navigation,
Enter Title as My Documents,
Click on Browse Button,
Select MyDocuments.aspx Page from Page Library,
Click OK,
This will create a new Search Vertical on the Search Center with name My Documents.
Finally we need to test this new Search Vertical.
Currently I am logged in as sp\spdeveloper
Go to Search Center,
Enter Search Query in our case which is *.pdf to return all the documents with the extension .pdf.
Everything Search Vertical will show all the PDF documents returned by the query,
But My Document Search Vertical will show only those PDF documents which are Authored or Co-Authored by me,
Creating new Search Verticals can be helpful in scenarios where a business user needs to filter out the results returned by the queries under different names by limiting the results based on the Result Sources.
Hope this will help someone in need.
Read more articles on SharePoint: