Previous in Contents Next in Contents

Save Method

This method saves any changes to the Search schema.

Syntax

ISearchSchema.Save

Remarks

You must call this method to save any changes you've made to the Search schema. Otherwise, the changes disappear once your program exits.

Save validates some of the changes made to the IColumns and IStoplists interfaces, and can return an error based on an invalid or duplicate value in either interface.

You should only call the Save method once—make all of your changes to the Search schema and then call Save. However, if you must call the Save method more than once, release and reload the schema by calling the BuildCatalog.Schema (see SR_Accessing an ISearchSchema Interface Object ).

Example

The following example adds the VBScript document property to the indexed Search schema for the KMSampleCatalog2 catalog definition.

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildCatalog, objColumn 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
Set objBuildCatalog = _
  objSearchAdmin.BuildServer.BuildCatalogs("KMSampleCatalog2")
Set objColumn   = objBuildCatalog.Schema.Columns("VBScript")

objColumn.Index = True
objBuildCatalog.Schema.Save

Wscript.Echo "Added VBScript column to KMSampleCatalog2's schema"

'Release objects
Set objColumn   = Nothing 
Set objCatalog  = Nothing 
Set objSearchAdmin = Nothing 
 

See Also

IColumns, IStoplists


© 1997-2000 Microsoft Corporation. All rights reserved.