Monday, August 18, 2014

Enable continuous crawls in SharePoint 2013 using powershell script

Enable continuous crawls in SharePoint 2013 using powershell script

Execute below command in powershell console for every 10 minutes

$searchServiceContentSource = "NameofContentsource"

$crawlInterval = 10

$ssa = Get-SPEnterpriseSearchServiceApplication

$cs1 = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $ssa -Identity $searchServiceContentSource

Set-SPEnterpriseSearchCrawlContentSource -Identity $cs1 -EnableContinuousCrawls $True

$ssa.SetProperty("ContinuousCrawlInterval", $crawlInterval)

$ssa.Update()

Note- If you have multiple search service app, mention name of search service app infront of $ssa.

Check Central administration and confirm if continuous crawls are enabled and set to run every 10 mins.

No comments:

Post a Comment