Using result sources to target searches

Result sources are a very powerful aide to SharePoint search. Using the Keyword Query Language (KQL) syntax you can put restrictions on search results – eg to return documents only from a specific site or document library. Please note: result sources will need to be created in the SharePoint Search Service Application. MacroView DMF/Message will not find result sources created at the site collection level. 

This article describes how to implement result sources in your MacroView DMF/Message search masks. 


SharePoint On-Premise with MacroView Server deployed (2010, 2013, 2016)

  • <Mask Name="Display name" TrimDuplicates="False" EnableStemming="True" Scope="Result Source Name" >

SharePoint Online / Client Side Only (DMF/Message 8.4.1122 and above)

  • <Mask Name="CSO" TrimDuplicates="False" EnableStemming="True" ResultSource="sourceid='8149a238-e19c-4cfb-97d9-fdeec4f318fd'" ServerName="cso2013">
  • Notes:
    • sourceid is the internal SharePoint ID for the result source. It can be found in the URL bar of your browser when you select a results source.
    • ServerName is the display name you use for your SharePoint Online / Client Side Only server in DMF/Message. If omitted, the mask will be available for all SharePoint Online/Client Side Only servers.

Result Source Examples

  • {?path:{Scope}} {?owstaxIdMetadataAllTagsInfo:{Tag}} (IsDocument:"True" OR ContentTypeId:"0x01*" OR "ContentTypeId:0x0120*") path:"http://mvsp2013mh5/legal/" {searchTerms} -fileextension:aspx
  • {?path:{Scope}} {?owstaxIdMetadataAllTagsInfo:{Tag}} (IsDocument:"True" OR contentclass:"STS_ListItem")(path:http://mvsp2013mh5/sites/mvcm*){searchTerms}
  • {?path:{Scope}} {?owstaxIdMetadataAllTagsInfo:{Tag}} (ContentTypeId:"0x010100776D10CC9E0943CEA6FE18350BDDD96C*" OR ContentTypeId:"0x010100BF89298E8523354B99672AB5830DD26A*" OR ContentTypeId:"0x0120D52000075BF3D401122B4181DA22E66098D4F1*" OR ContentTypeId:"0x010100776D10CC9E0943CEA6FE18350BDDD96D*") path:"http://mvsp2013mh5/sites/34" {searchTerms}

Note: Stemming is achieved through a wildcard, e.g. path:http://mvsp2013mh5/sites/mvcm*

Related articles:


Have more questions? Submit a request


Article is closed for comments.