Search configuration in the SharePoint Add-in model

Summary

The approach you take to configure search is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, the SharePoint Server-side Object Model was used to configure search, and deployed via SharePoint Solutions.

In an SharePoint Add-in model scenario, you use the SharePoint Client-side Object Model (CSOM) or REST API to configure search. This pattern is commonly referred to as the remote provisioning pattern.

High-level guidelines

As a rule of a thumb, we would like to provide the following high-level guidelines to configure search in the new SharePoint Add-in model.

  • Use the SharePoint Client-side Object Model (CSOM) API to configure search whenever possible by importing and exporting search configuration settings.
  • Not all search configuration settings are currently available via the SharePoint CSOM API.
  • The SharePoint REST API is not capable (at this time) of importing or exporting search configuration settings.

Getting started

The following sample demonstrates how to import and export search settings between SharePoint tenants, site collections and sites.

Related links

Related PnP samples

Applies to

  • Office 365 Multi Tenant (MT)
  • Office 365 Dedicated (D)
  • SharePoint 2013 on-premises