You access ICatalogProperties interface 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 the current build for a searchable catalog. The following example displays all of the catalog properties for all of the catalog definitions:
Option Explicit
On Error Resume Next
Dim objSearchAdmin, objBuildCatalog, Property
Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
For Each objBuildCatalog in objSearchAdmin.BuildServer.BuildCatalogs
Set Property = objBuildCatalog.PreviousBuildProperties
'Show the properties
Wscript.echo "Catalog " & objBuildCatalog.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 " Propagation number: " & Property.PropSeqNum
Wscript.Echo ""
Next
'Release objects
Set Property = Nothing
Set objBuildCatalog = Nothing
Set objSearchAdmin = Nothing