Add Method

This method adds a list of ignored words.

Syntax

IStoplists.Add(Name, Filename, Language, SubLanguage)

Parameters

Name

A text string specifying the name of the stop list. Sets the Name property of the resulting stop list to this value.

Filename

A text string specifying the full path to the file containing the list of words that Search ignores. Sets the Filename property of the resulting stop list to this value.

Language

A vbLong specifying the language to which the stop list applies. Sets the Language property of the resulting stop list to this value.

SubLanguage

A vbLong specifying the language dialect to which the stop list applies. Sets the SubLanguage property of the resulting stop list to this value.

Remarks

The Language and SubLanguage values must be unique in this Search schema.

Validation is not performed  until you execute the  SearchSchema.Save method.

Example

The following example adds the stop list at C:\SiteStoplist\Noise.enu to the schema for the KMSampleCatalog1 catalog definition.

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objSchema, objStoplists 

Set objSearchAdmin   = CreateObject("Search.SearchAdmin.1") 
Set objBuildServer   = objSearchAdmin.BuildServer 
Set objCatalogs   = objBuildServer.BuildCatalogs 
Set objCatalog    = objCatalogs("KMSampleCatalog1") 
Set objSchema     = objCatalog.objSchema 
Set objStoplists  = objSchema.objStoplists 

objStoplists.Add "Noise", "C:\objStoplists\Noise.enu", 9, 1 

'Release objects 
Set objStoplists  = Nothing 
Set objSchema     = Nothing 
Set objCatalog    = Nothing 
Set objCatalogs   = Nothing 
Set objBuildServer   = Nothing 
Set objSearchAdmin   = Nothing 
 

See Also

Count, Remove


© 1997-1998 Microsoft Corporation. All rights reserved.