Skip to content

Sharepoint search

The 'SharePoint Search' data source retrieve items from the SharePoint search engine.

The SharePoint search is different from the Microsoft Graph search.

Source configuration

Setting Description Default value
Query text The input query text to pass to the search engine. This setting is not configurable directly in the data source options. To enable it, go to the third configuration page of the Web Part and select either a static or dynamic value (Ex: from a connected search box Web Part). See the connection documentation for more information on how to configure this option. This value can be then used in the Query template using the {searchTerms} token. Also this value can be a Keyword Query Language expression (KQL). None.
Query template The search query template to use. It allows you to use dynamic tokens according to the context or specify conditions that should always apply to the query. {searchTerms}
Result source ID Can be either a built-in result source ID listed in the dropdown, or a custom result source that you specify. Type the GUID of the result source, or the SCOPE and NAME, separated by \| (pipe character). For this to take effect, you must press 'Enter' to save the value. Valid scopes are SPSiteSubscription, SPSite, SPWeb. Examples:
  • SPWeb\|Local News
  • SPSite\|Contracts
  • SPSiteSubscription\|Intranet
LocalSharePointResults
Selected properties The SharePoint managed properties to retrieve from the results. They can be used with the same name in layouts and slots afterwards.
Please be aware that the way we get the list of managed properties is not reliable and you might have to enter the property name manually. To add other managed properties to the list, clear out the dropdown list field and manually type or paste the name of your managed property and press ENTER. This will add it to the list of selected properties in the query. Pasting a comma separated list of property names also work. You can validate the property is working by using the Debug layout. If a list of properties is not shown, enter manually.
  • Title
  • Path
  • DefaultEncodingURL
  • FileType
  • HitHighlightedProperties
  • HitHighlightedSummary
  • AuthorOWSUSER
  • owstaxidmetadataalltagsinfo
  • Created
  • UniqueID
  • NormSiteID
  • NormListID
  • NormUniqueID
  • ContentTypeId
  • UserName
  • JobTitle
  • WorkPhone
  • SPSiteURL
  • SiteTitle
  • CreatedBy
  • HtmlFileType
  • SiteLogo
Sort settings Configure the sort settings of the data source. Properties listed in the dropdown are all static properties marked as 'Sortable' in the SharePoint search schema. However, it does not list all possible RefinableXXX or aliases fields. To use them, you must enter the value manually and press 'Enter' to validate. For a particular field, you can define if it should be used for initial sort (i.e. when the results are loaded for the first time) or be only available for users in the sort control (i.e. after the results are loaded). The sort control does not consider default sort fields (i.e. select them by default) and you can only sort on a single field at a time according the fields you defined. If no user sort fields are defined in the configuration, the sort control won't be displayed. None.
Refinement filters The initial refinement filters to apply to the query. Filters has to be written using FQL (Fast Query Language) (e.g. FileType:equals("docx")). They will be applied every time to the current search query regardless selected filters from connected Web Parts. Note: for string expressions, use " instead of '. None.
Language of the search request The language to use for the search request. By default the search request will be made using the current user interface language. This parameter is mainly used to process diacritics, plurals, etc. correctly according to the language. Current UI language.
Enable query rules Whether or not apply SharePoint query rules. False.
Trim duplicates A Boolean value that specifies whether duplicate items are removed from the results. False.
Enable audience targeting Whether or not results should be targeted according to the audiences that the current user belongs to. More information about modern audiences and how to configure them. False.
Enable localization If enabled, the Web Part will try to translate the taxonomy term IDs found in result item properties and refinement values to their corresponding label according to the curent UI language. To get it work, you must map a new refinable managed property associated with ows_taxId_ crawled property and turn this toggle 'on': If enabled and depending on how many items are currently being displayed, this could slightly decrease the loading performance.

To use translated values in your template, you must use the 'Auto + <property_name>' property format instead of the original property name. For instance, to use translated values of the 'owstaxidmetadataalltagsinfo' property, you must use the 'Autoowstaxidmetadataalltagsinfo' auto created property.
False.
Hit-highlighted properties The list of SharePoint managed properties (separated by a comma) to return hit highlighted information (whether the search query match each specified managed property or not).

Note: HitHighlightedProperties will be null if there is a field in Hit-highlighted properties doesn't exist in Selected properties

None.
Collapse specification The CollapseSpecification property takes a Spec parameter that can contain multiple fields separated either by a comma or a space, which evaluated together specify a set of criteria used for collapsing. More information about the CollapseSpecification. None.