Home  »  ProgrammingSharePoint   »   [Solved] Force web, whole list or library to be re-crawled by search in SharePoint 2013 using API

[Solved] Force web, whole list or library to be re-crawled by search in SharePoint 2013 using API

By | May 12, 2016

There is a new option in SharePoint 2013 that allows you to re-index list or document library.
You can find more about this on those blogs:

Important:It does not work in SharePoint 2010!

It is also possible to do it for whole web. Thanks to this all items in all lists will be re-crawled.

I would like to show you how to do it using API.
When using API you can use it on any type of list. It also works for non-document library items, like tasks.

Re-crawl Web

Re-crawl list

[contact-form-7 id=”762" title=”Feedback”]

No votes yet.
Please wait...

3 thoughts on “[Solved] Force web, whole list or library to be re-crawled by search in SharePoint 2013 using API

  1. Sergey

    Does it work on items(documents) and not root folders?

    No votes yet.
    Please wait...
    Reply
    1. Sebastian Expert Post author

      for documents there is an option for this in UI.

      No votes yet.
      Please wait...
      Reply
  2. Georgi Lubomirov

    Powershell version for the folder one

    function markFolderForSearch($web,$list){

    $web = get-spweb $web
    $list = $web.lists[$list]

    if($list){
    $version = $list.RootFolder.Properties[“vti_searchversion”]

    if(!$version){
    $version = 0;
    }

    $list.RootFolder.SetProperty(“vti_searchversion”, $version+1)
    $list.update()

    } else {
    write-host “List not found” -ForegroundColor Red
    }
    }

    No votes yet.
    Please wait...
    Reply

Leave a Reply

Your email address will not be published.