Starting a Full Rescan


Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.


This code segment uses the GetCatalogByName method of the gCiAdmin AdminIndexServer object to create CiCatalog, a CatAdm object. It then uses the GetScopeByPath method of the CiCatalog CatAdm object to create CiScope, a ScopeAdm object for the selected scope. It then uses the Rescan method of the CiScope ScopeAdm object with True specified to perform a full rescan the selected scope. The StartFullRescan procedure is called whenever the option to force a full rescan of the scope is selected on the form.

Private Sub StartFullRescan()
    Dim CiCatalog As Object
    Dim CiScope As Object

    Set CiCatalog = ISAdminForm.gCiAdmin.GetCatalogByName(CatName)
    Set CiScope = CiCatalog.GetScopeByPath(ScopeName)

    CiScope.Rescan True
End Sub