This method adds a mapping to the list of mappings.
Syntax
IMappings.Add(From, To)
Parameters
From
The crawler access location in the file system where the file is located.
To
The display location where the file is displayed to site visitors.
Remarks
Example
The following example add the mapping of C:\InetPub\wwwroot to http://www.microsoft.com.
Option Explicit
On Error Resume Next
Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objMappings, objMapping
Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
Set objBuildServer = objSearchAdmin.BuildServer
Set objCatalogs = objBuildServer.BuildCatalogs
Set objCatalog = objCatalogs("KMSampleCatalog2")
Set objMappings = objCatalog.objMappings
Set objMapping = objMappings.Add "C:\InetPub\wwwroot",
"http://www.microsoft.com"
'Release objects
Set objMapping = Nothing
Set objMappings = Nothing
Set objCatalog = Nothing
Set objCatalogs = Nothing
Set objBuildServer = Nothing
Set objSearchAdmin = Nothing
See Also