HostDepth Property

This property specifies the number of site hops Search can make when crawling the start address.

Syntax

IStartPage.HostDepth

Example

The following example displays the site hops for the start address http://www.microsoft.com for the KMSampleCatalog2 catalog definition.

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objStartPages, objStartPage 

Set objSearchAdmin    = CreateObject("Search.SearchAdmin.1")
Set objBuildServer    = objSearchAdmin.BuildServer
Set objCatalogs    = objBuildServer.BuildCatalogs 
Set objCatalog     = objCatalogs("KMSampleCatalog2")
Set objStartPages  = objCatalog.objStartPages
Set objStartPage   = objStartPages.Item("http://www.microsoft.com")

Wscript.Echo objCatalog.Name & " goes " & objStartPage.HostDepth 
  & " levels deep For Web page " & objStartPage.URL 

'Release objects
Set objStartPage  = Nothing 
Set objStartPages = Nothing 
Set objCatalog    = Nothing 
Set objCatalogs   = Nothing 
Set objBuildServer   = Nothing 
Set objSearchAdmin   = Nothing 
 

See Also

EnumerationDepth, FollowDirectories, URL


© 1997-1998 Microsoft Corporation. All rights reserved.