Trigger a Full Crawl on SharePoint Online

Trigger a Full Crawl on SharePoint Online

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
 $clientContext.Load($web) 
 $clientContext.Load($web.AllProperties)
 $clientContext.Load($subWebs)
 $clientContext.ExecuteQuery()

 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"]
 }
 $version++
 $allProperties["vti_searchversion"] = $version
 Write-Host "-- Updated search version: " $version -ForegroundColor Green
 $web.Update()
 $clientContext.ExecuteQuery()

 foreach ($subWeb in $subWebs)
 {
 processWeb($subWeb)
 }
}

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

Search Based Portals: SharePoint Architectures

Search Based Portals: SharePoint Architectures

As per TechNet, the standard cross-site publishing architecture in SharePoint 2013: Content is created in libraries and lists that are shared as catalogs in the authoring site collection(s). The search system crawls the content and builds the search index. A user views a page on a publishing site, which triggers queries from Search Web Parts and results are returned from the search index, and shown in Search Web Parts on the page.

One Authoring Site Collection, Many Publishing Site Collections (1:1,1:n)

Examples of single source search solution architectures include:

  • Data silos to be syndicated to many different sites: For example press releases may be syndicated anonymously to the public web site, intranet site, and appropriate client extranet portal. They will be authored by select few with permissions in the Press Releases site.
  • Syndicating knowledge from existing legacy / custom / enterprise applications: For example a Document Management System, Exchange, ERP or CRM tools.

Many Authoring Site Collections, One Publishing Site Collection (n:1, n:n)

Examples of multiple source search solution architectures:

  • Governance requirements dictate security trimming is critical: Rolling up reports & data from many SharePoint sites containing sensitive data.
  • Syndicating knowledge within legacy SharePoint portals to Next-Gen User Experiences: Your organization invested in SharePoint with the 2007 or 2010 release, your collaboration portals are being used, but you need a better user experience.
  • User-centered portals aggregating complex collaboration site architectures in a structured manner. Delve follows this pattern by aggregating data from all Office 365 properties that it believes are relevant to the user to build a personal UX.

Multilingual, Asset Sites and Extranets

A more practical architecture using search to syndicate intranet knowledge through a firewall to extranet / public websites.

  • Use of SharePoint Publishing Variations & Workflows to author multi lingual content into list items. Building on OOTB Strengths.
  • Syndication of content into portals for .com, .fr sites: By separating into separate site collections we have opportunity to better support each languages branding needs (EX// RTL, LTR).
  • Use of shared assets site to host all public / extranet content: We host all asset content (images, documents, etc.) on a public site collection called assets which is also available to content authors for contributions.
  • Sites exposed by domain on port 80/443 through firewall.
  • Limitation: Search does not index web parts so of limited use to authoring process.

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