Commerce Server 2002 SDK
IProductCatalog3::RegenerateFreeTextSearchIndex Method [C++]

Use this method to regenerate the free-text search index of a catalog.

Definition

[C++]
HRESULT IProductCatalog3::RegenerateFreeTextSearchIndex(
 VARIANT_BOOL fGenerateIncremental
);
[Visual Basic]
Sub RegenerateFreeTextSearchIndex(
 fGenerateIncremental As Boolean
)

Parameters

fGenerateIncremental [C++]
[in, defaultvalue (0)] A VARIANT_BOOL that determines whether an incremental or a full rebuild of the free-text search index is to be performed. A value of True indicates an incremental rebuild. A value of False indicates a full rebuild. See the Remarks section for more information.
fGenerateIncremental [Visual Basic]
A Boolean that determines whether an incremental or a full rebuild of the free-text search index is to be performed. A value of True indicates an incremental rebuild. A value of False indicates a full rebuild. The default value is False. See the Remarks section for more information.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] None.

Error Values

[C++] This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

ConstantValueDescription
E_CAT_CATALOG_DOESNT_EXIST

[C++] 0x88980002

[Visual Basic] &H88980002

The catalog name you specified does not exist.
E_CAT_CANNOT_REFRESH

[C++] 0x8898004C

[Visual Basic] &H8898004C

A catalog import operation is currently in progress. The refresh operation cannot be performed now.

[C++] Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The fGenerateIncremental parameter determines what type of free-text index rebuild to perform. The default is to completely rebuild the free-text index. Though this option ensures completeness, it is slower than an incremental rebuild, which appends only recently added products and categories to the index.

If the database in which Commerce Server keeps its catalog data does not have the SQL Server 2000 full-text engine installed, this method will return with no action.

This method cannot be called in a transacted object. This method involves the creating, deleting, or updating of free-text indexes. SQL Server does not allow these operations in a transaction.

This method will create a new full-text index for the catalog if it does not exist.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

[Visual Basic]

Example

myProductCatalog.RegenerateFreeTextSearchIndex TRUE

See Also

[C++] ProductCatalog Object

[Visual Basic] ProductCatalog Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.
Page view tracker