Using result sources to target searches

Result sources are a very powerful aide to SharePoint search. Using the KQL syntax you can put restrictions on search results – eg Legal documents only.

To modify the search scope in a MacroView DMF search panel to use a result source, specify the result source in the mask header as follows:

Syntax

SharePoint On-Premise (2010, 2013, 2016)

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

SharePoint Online (DMF/Message 8.4.1122 and above)

  • <Mask Name="CSO" TrimDuplicates="False" EnableStemming="True" ResultSource="sourceid='8149a238-e19c-4cfb-97d9-fdeec4f318fd'" ServerName="cso2013">
  • 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 server in DMF/Message.

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

0 Comments

Article is closed for comments.