In this post we will explore a new mechanism of Searching data based on Custom User Intents and serve them as Result Blocks on top of the Search Results.
By the way what is Custom User Intent?
Custom User Intent means matching a Search Term specified by the end user with the Phrases defined using Query Rules. For example, PowerPoint Slides are also known as Decks. So if the business user specified a Search Term as “SharePoint Deck”, it was really intended to search all the PowerPoint Slides which contain “SharePoint” as shown in the image below.
Hope the above example suffices to clarify the Custom User Intent.
Business Scenario:
For the sake of this demo, I have setup an imaginary scenario, where in my organization business users refer all types of videos as “Small Medium Sized Video” or “SMV”. As the matter of habit all users make use of keyword “SMV” in order to search for video files in SharePoint System.
In order to implement the Custom User Intent based on above scenario we have to follow the below steps:
>>Go To “Site Settings”
>>Under “Search” section Click on “Query Rules”
>>Create & Configure Query Rule
- Select the required “Result Source”, in our case we can go with “Local SharePoint Search Results”.
- Click on “New Query Rule” in order to create a new Query Rule.
- Specify rule name as “Custom Video Intent”
- Under “Query Conditions” “Query Contains Action Term” and specify the phrases you want to match to identify the User Intent, like we specified as “smv;smvs”.
- Click on “Add Result Block” to specify the query based on which Result Block will be rendered.
>>Configure Result Block
- Specify the “Block Title” as shown below
- Click on “Launch Query Builder” button to configure the query
>>Configure query
- Select result source “Local Video Results”.
- Click on “Test Query” button to test the query based result source selected in Step 1.
- “Search Result Preview” Section on the right will show the results returned as a part of the query specified earlier.
- Click “OK” to save the Query Changes.
>>Configure Display Templates
- Choose suitable Display Template from “Item Display Template” dropdown list.
And that’s it. We are all done with our new Query Rule defining Custom User Intent.
Now it is time to see the Query Rule in Action. In order to test it go to Search Center and enter “SharePoint smv” as search term and click Search Icon. You will see the Search Results Block “Video Results for SharePoint” containing items which contains “SharePoint” in their Title or Description.
Hope this will help someone in need…
Read more articles on SharePoint: