Reindex
Re-crawl sites and lists in bulk
The Reindex site and Reindex document library buttons in SharePoint's settings, for many sites, lists and libraries at once. Each one's search version is raised by one, which tells SharePoint's crawler to crawl it again in full at its next pass. Use it after a migration when content does not show in search, or after changing a managed property mapping.
What it does
- Content copied in last week still does not show in search.
- A search schema change should apply to content that is already indexed.
- Which of the sites I asked for were re-crawl requested, and which were skipped and why.
How it runs
- Sign in. One sign-in when you click the tile. Any of the three credentials works for the write.
- Choose. Tick sites, or open a site and tick its lists and libraries. A whole site re-crawls everything in it; a library is lighter.
- Options. Include subsites of ticked sites, and what to do where custom scripting is off: skip and report (the default), or allow it for the run and put it back.
- Run. One row per site or list: Requested, Skipped or Failed, with the search version before and after. Stop offers to finish the one in progress.
- Afterwards. Save the report. Every run is kept in History with its report. Use Item search properties to see when an item's index entry changes.
How it works
Reindex changes one hidden value on each site or list: its search version number, which SharePoint's crawler reads to decide that the whole site or list must be crawled again. It is the same value SharePoint's own Reindex buttons change. The number goes up by one, and a site or list that never had one gets 1. Nothing else is written and nothing is deleted.
Targets are worked one at a time, grouped by site collection. For each, the current value is read, then read again just before the write; if it moved in between, nothing is written and the row fails. The old value is saved to a backup on this computer before the write, and if the backup cannot be saved nothing is written. After the write the value is read back, and a value that is not the one written is a failure, never Requested.
Before the first target in each site collection, its custom scripting setting is read. Where custom scripting is off, SharePoint refuses the change, so by default those targets are skipped with that reason and nothing on them is written. If you chose to allow it for the run, it is turned on for that site collection, its targets are written, and it is turned off again before the next site collection starts, and also on Stop or an error. If turning it back off fails, no other site collection has custom scripting turned on for the rest of the run, and the page names the site and offers to try again.
Requested means the request was recorded; SharePoint re-crawls on its own schedule, and the run cannot see when that has finished. Include subsites adds every subsite below a ticked site, without repeats. Each run, with its rows and report, is kept in Reindex History on this computer.
What you need
- Manage Web permission (site owner) on each site, list or library. Allowing custom scripting for the run also needs a SharePoint administrator, and is not available on a certificate.
What it will not do
- Requested is not reindexed: SharePoint re-crawls on its own schedule, usually within hours. The run cannot watch the crawl finish.
- SharePoint refuses the change on a site collection with custom scripting off. Those are skipped and reported unless you choose to allow custom scripting for the run.
- If custom scripting could not be turned back off, the run says which site and offers to try again.
- Not yet run on a live tenant.
Read next
- Item search properties: Check whether one item is in search, and why not.