One way of limiting search results for a mask is to use the Where attribute. This takes any valid KQL query and works for both SharePoint On-Premise and Online.
Example
<Mask Name="DocSets" TrimDuplicates="False" EnableStemming="True" Scope="All Sites" Where="ContentTypeId:0x0120D5* AND path:https://macroview365.sharepoint.com/sites/*" >
This will restrict results to document sets located beneath the specified path.
Notes on usage:
- AND and other operators need to be in upper case
- Operators are case sensitive so Where must be in mixed case
- Escape out characters like quotation marks in the usual way
i.e. use " when you want a " (quote) passed through.
For example:
Where="path:"https://macroview365.sharepoint.com/sites/mhmvcm/Test Column 211016/*""
Related articles