Search notes, custom verticals and refiners
Search notes, custom verticals and refiners
This week we shipped custom verticals and refiners on SharePoint content worldwide.
Search verticals only show results of a certain type or from certain content. Examples are Files or News. By default, Microsoft Search shows the verticals All, People, Files, Sites, and News. You can add search verticals that are relevant to your organization that represent content indexed with one or more Microsoft Graph … keep reading.
Vertical and filter customization on SharePoint content allows a Microsoft Search administrator to edit out-of-the-box search verticals, such as Files, Sites, News, etc., and create custom verticals on SharePoint content at the organization and site levels (tenant-scoped and site-scoped respectively).
For example, you can add an ‘Author’ filter to Files vertical to refine the results by one or more authors or a ‘Modified’ filter to the News vertical to refine the results by date created or modified and sort ascending or descending.
In the past, this level of customization has been limited to 3P verticals (verticals based on 3rd party data index-time merged with Microsoft Graph connectors).
With this new feature, you can create custom verticals based on SharePoint content (I.e. sites). Perhaps your organization is a legal firm, using custom verticals and filters with SharePoint content, you can create a dedicated search vertical where users can search by location, case type, retainers, etc.
In addition to creating these verticals and related filters, search administrators can also curate a vertical to narrow down results based on dynamic information such as location, user profile, etc., using query variables. Assuming the law firm in the above example is a MNC, a search administrator can use query variables to show results based on the users’ location from their user profile.
A final part of this feature includes the relocation of filters - instead of filters in the context region of the page (right rail), filters are now placed below their respective vertical.
Creating verticals and filters with SharePoint content
To create a custom vertical on SharePoint content, select Search & intelligence under Settings in the Microsoft 365 admin center.
In the Search & intelligence admin center, select Customizations, and then select Verticals. Click Add to add a new vertical and then click Next.
On the Name the vertical screen, provide a unique, meaningful name for the vertical and click Next.
On the Select a content source screen, select SharePoint and then click Next.
On the Add a query (Optional) screen, optionally add your query variable(s) using Keyword Query Language, for example:
filetype:pdf
marketing rese*
or perhaps a more complex file query such as:
({searchterms})
(
NOT (Title:OneNote_DeletedPages OR Title:OneNote_RecycleBin)
AND NOT SecondaryFileExtension:onetoc2
AND NOT FileExtension:vtt AND NOT ContentClass:ExternalLink
AND NOT (ContentClass:STS_List_DocumentLibrary AND SiteTemplateId:21)
AND NOT ((filetype:aspx OR filetype:htm OR filetype:html OR filetype:mhtml))
AND isDocument:1
OR (
(
ContentTypeId:0x010100F3754F12A9B6490D9622A01FE9D8F012
OR ContentTypeId:0x0120D520A808*
)
OR (
SecondaryFileExtension:wmv
OR SecondaryFileExtension:avi
OR SecondaryFileExtension:mpg
OR SecondaryFileExtension:asf
OR SecondaryFileExtension:mp4
OR SecondaryFileExtension:ogg
OR SecondaryFileExtension:ogv
OR SecondaryFileExtension:webm
OR SecondaryFileExtension:mov
)
)
OR (
FileType:ai
OR FileType:bmp
OR FileType:dib
OR FileType:eps
OR FileType:gif
OR FileType:ico
OR FileType:jpeg
OR FileType:jpg
OR FileType:odg
OR FileType:png
OR FileType:rle
OR FileType:svg
OR FileType:tiff
OR FileType:webp
OR FileType:wmf
OR FileType:wpd
)
OR (ContentTypeId:0x012000*)
)
AND NOT (ContentTypeId:0x0101009D1CB255DA76424F860D91F20E6C4118* AND PromotedState:2)
AND NOT Path:https://contoso-my.sharepoint-df.com/personal/meganb/
Click Next.
On the Select a property for your filter screen, choose a property to filter the results by and click Next.
On the final screen, review the vertical settings, and then select Enable Vertical to publish the vertical.
The above steps will create a custom vertical that is tenant-scoped, meaning it will be available in SharePoint Home, Office.com, and Microsoft Bing (when signed in with a Work or school account).
In addition to tenant-scoped verticals, you can also create site-scoped verticals following a similar process as to that above under Site settings | Microsoft Search for your target site.
Resources
Comments
Comments
Keith Tuomi
Tue, 06 Jun. 2023, 20:46 UTC
Hi Bill, We could get this working on some site collections, but when adding to our root site the vertical doesn't seem to appear, even after a site re-index request and waiting 24H. Adding the cacheclear=true parameter reveals the vertical immediately. Is there something else that may be blocking it from appearing?
Jean-Paul van den Bogert
Thu, 23 Feb. 2023, 10:14 UTC
Got it working by removing the accolades and searchterm object. Also using SPSiteURL to restrict results from only that site. So this is basically the query that I fill into the vertical: SPSiteURL:https://test.sharepoint.com/sites/1 OR SPSiteURL:https://test.sharepoint.com/sites/2
Jean-Paul van den Bogert
Wed, 22 Feb. 2023, 10:16 UTC
Hi Bill, Your example {Searchterms} {Path:https://test.sharepoint.com/sites/1 OR Path:https://test.sharepoint.com/sites/2} Always shows "We couldn't find any results on this site for ******" I've tried using the text formatting in your complex query but with no avail. I'm trying to limit the News vertical on a homesite to only search in particular news sites. When I use a different vertical (with no query) I can find the news posts with no problem. Do you know why I can't get any results?
Bill Bär
Wed, 01 Jun. 2022, 15:18 UTC
Dirk, Is the question as to whether a filter can be localized or whether you can filter against a specific locale? Filters are based on refineable managed properties. Bill
Bill Bär
Wed, 01 Jun. 2022, 14:57 UTC
Roberto, To ignore a specific file type you could use a query variable such as ({searchterms})(NOT FileExtension docx). Bill
Dirk
Wed, 01 Jun. 2022, 07:14 UTC
Thank you for the very good overview! I was wondering whether there are plans to have multiple languages for the filters. Thanks for your help! Dirk
Roberto
Sat, 21 May. 2022, 03:10 UTC
Is it possible to ignore a specific file type?