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 reindex 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 the 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?

If you want to re-crawl a list or document library, follow these steps:

  1. Navigate to the list or document library >> Click on Settings >> Choose List or Library Settings.
  2. Click on Advanced Settings.
  3. Scroll down to the Reindex section and click on the “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 a document library SharePoint 2016.
    reindex document library sharepoint 2016

All content of your List or Library will be reindexed during the next scheduled crawl.

Reindex SharePoint List using PowerShell

Do you need to reindex a SharePoint list or document library in a scripted way? Here is the PowerShell way to do it.

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

#Site collection URL variable

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

    [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
    #Update the Search version number
    $List.RootFolder.SetProperty("vti_searchversion", $SearchVersion)

    Write-host -f Green "Search Version has been increased to $SearchVersion on $ListName"

Although it is possible to reindex a list or library using the SharePoint user interface, PowerShell provides a more efficient solution. By using the PowerShell script, you can easily reindex a list or library with just a few lines of code.

Reindexing a list or library using PowerShell ensures that the search index is up-to-date and accurate, which can improve the search experience for end users. With the knowledge gained from this tutorial, you can begin reindexing your SharePoint lists and libraries with PowerShell.

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

3 thoughts on “How to Reindex SharePoint List or Document Library?

Leave a Reply

Your email address will not be published. Required fields are marked *