kwizcom banner advertisement

How to Reindex SharePoint List or Document Library?

Requirement: Reindex List or Document Library in SharePoint.

Reindex feature in SharePoint allows you to force the search service to re-index the list or library regardless items are changed or not. The full crawl schedule reindexes all items by default (which you can trigger on-demand from search service application in SharePoint On-premises). But when you use reindex feature in SharePoint, those items are flagged for re-crawl and they will be crawled during the next incremental or continuous crawl.

How to Reindex a SharePoint List?
Similarly, If you want to re-crawl a list or document library, follow these steps:
  1. Go to the List or Library Settings.
  2. Click on Advanced Settings.
  3. Scroll down to Reindex section and click on "Reindex" button (For Lists, You'll find a button "Reindex List" and for Libraries, "Reindex Document Library").
    reindex sharepoint document library
  4. Confirm the prompt to reindex document library SharePoint 2016.
    reindex document library sharepoint 2016
The all content of your List or Library will be reindexed during the next scheduled crawl.

Reindex SharePoint List using PowerShell
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

#Site collection URL variable
$SiteURL="http://intranet.crescent.com/"
$ListName="Documents"

#Get the Web and List objects
$Web = Get-SPWeb $SiteURL
$List = $web.Lists.TryGetList($ListName)

If($List)
{
    [Int] $SearchVersion = 0

    #Get the existing search version number
    If($List.RootFolder.Properties.ContainsKey("vti_searchversion") -eq $True)
    {
        $SearchVersion = $List.RootFolder.Properties["vti_searchversion"]
    }

    #Increment Search version
    $SearchVersion++
 
    #Update the Search version number
    $List.RootFolder.SetProperty("vti_searchversion", $SearchVersion)
    $List.Update()

    Write-host -f Green "Search Version has been increased to $SearchVersion on $ListName"
}
How to Reindex SharePoint List or Document Library? How to Reindex SharePoint List or Document Library? Reviewed by Salaudeen Rajack on March 14, 2018 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.