Mikael Svenson wrote a cool script which will iterate all site collections, sites and sub-sites on your tenant to force a trigger of re-indexing / full crawl of all items on the next crawl.

In SharePoint Online we cannot force a full crawl via the admin user interface and thus have to iterate all sites and set a property in the property bag to accomplish the same task:

function processWeb($web) {

 $subWebs = $web.Webs

 Write-Host "Web URL:" $web.Url -ForegroundColor White
 if( $enableAllManagedProperties -ne "skip" ) {
 Set-AllManagedProperties -web $web -clientContext $clientContext -enableAllManagedProps $enableAllManagedProperties

 [int]$version = 0
 $allProperties = $web.AllProperties
 if( $allProperties.FieldValues.ContainsKey("vti_searchversion") -eq $true ) {
 $version = $allProperties["vti_searchversion"]
 $allProperties["vti_searchversion"] = $version
 Write-Host "-- Updated search version: " $version -ForegroundColor Green

 foreach ($subWeb in $subWebs)

This is needed for several search schema modifications, for example when you map crawled properties to managed properties.

The script also has a function to enable population of the ManagedProperties managed property for use with the SharePoint 2013 Search Query Tool v2.

You can download the script here: https://github.com/wobba/SPO-Trigger-Reindex

Recent Insights

Configuring Microsoft Translator

The Microsoft Translator service is part of Cognitive Services and is available in the Azure portal for app developers. The service is free for up to 2 million characters of standard translation per month and includes: Standard Translation; Text Translation; Language Detection; Bilingual Dictionary; Transliteration and Custom Translation via training.

read more

Matthew Stark

Matthew Stark is the founder of Making Things Work, has over 16 years experience in the enterprise Information Technology space, is an avid sailor, hockey fan, and a proud father of one.