Skip to content

Commit 5a3ac21

Browse files
authored
Updates to reflect CDN changes for the Search API
Please review - updates to include CDN support originally documented in the CDN documentation 2 years ago but were regressed with the sync to async search change.
1 parent cbc3656 commit 5a3ac21

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/general-development/sharepoint-search-rest-api-overview.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ If your users also expect results from OneDrive for Business content that only t
2020

2121
<a name="bk_queryrest"> </a>
2222

23+
## Content Delivery Network (CDN) Support
24+
If the Office 365 Private or Public CDN is enabled to optimize performance for assets the this section applies to you. If your search results contain images that are served from the CDN, then the URL for the image will be the CDN URL that is returned in the results and not the asset library ___location. For more information on CDN please review [Use the Office 365 Content Delivery Network (CDN) with SharePoint Online](https://docs.microsoft.com/en-us/office365/enterprise/use-office-365-cdn-with-spo).
25+
26+
Public CDN URLs are URLs that can be reused but Private CDN URLs have a limited lifespan, so Private CDN URLs can only be utilized for a short time frame (currently 60 minutes). The URLs would be prefixed with "https://privatecdn" prefix for Private CDN and "https://publiccdn" prefix for Public CDN but any prefix code checks should not be hard-coded.
27+
As this prefix is subject to change in the future, please utilize the following page context property for Modern pages (this.context.pageContext.legacyPageContext.publicCdnBaseUrl) and for Classic pages (window._spPageContextInfo.publicCdnBaseUrl) to utilize the correct prefix URL. You can also view Season 1 Episode 4 in the [SharePoint performance series playlist](https://aka.ms/sppnp-perfvideos) which provides an example on how the property is used.
28+
For further information on Private CDN review [Using assets in Private CDN](https://docs.microsoft.com/en-us/office365/enterprise/use-office-365-cdn-with-spo#using-assets-in-private-origins).
29+
30+
2331
## Querying with the Search REST service
2432

2533
Search in SharePoint includes a Search REST service you can use to add search functionality to your client and mobile applications by using any technology that supports REST web requests. You can use the Search REST service to submit Keyword Query Language (KQL) or FAST Query Language (FQL) queries in your SharePoint Add-ins, remote client applications, mobile applications, and other applications.

0 commit comments

Comments
 (0)