You access ICatalogProperties objects by calling the IBuildCatalog.CurrentBuildProperties property for information on the current build, the IBuildCatalog.PreviousBuildProperties property for information on the previous build or the ISearchCatalog.Properties property for information on a searchable catalog. The following example displays all of the catalog properties for the KMSampleCatalog1 catalog definition:
Option Explicit
On Error Resume Next
Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, Property
Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
Set objBuildServer = objSearchAdmin.BuildServer
Set objCatalogs = objBuildServer.BuildCatalogs
Set objCatalog = objCatalogs("KMSampleCatalog1")
Set Property = objCatalog.PreviousBuildProperties
'Show the properties
Wscript.echo "objCatalog " & objCatalog.Name & " properties:"
Wscript.echo " Build date: " & Property.BuildDate
Wscript.echo " # docs: " & Property.NumberOfDocuments
Wscript.echo " Size of index: " & Property.IndexSize _
& " (MBytes)"
Wscript.echo " Size of property store " _
& Property.PropertyStoreSize & " (MBytes)"
Wscript.echo " # unique keys: " & Property.UniqueKeyCount
Wscript.echo " Crawl number: " & Property.PropSeqNum
Wscript.Echo ""
'Release objects
Set Property = Nothing
Set objCatalog = Nothing
Set objCatalogs = Nothing
Set objBuildServer = Nothing
Set objSearchAdmin = Nothing